mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 02:50:04 +00:00 
			
		
		
		
	add more handling to ensure that MarkerModel stays up to date with MarkerManager
This commit is contained in:
		
							parent
							
								
									aabf4fcbb0
								
							
						
					
					
						commit
						aec937aa97
					
				
					 4 changed files with 38 additions and 0 deletions
				
			
		|  | @ -181,6 +181,8 @@ MarkerManager::MarkerManager() : p(std::make_unique<Impl>(this)) | |||
|                            // Read Marker settings on startup
 | ||||
|                            main::Application::WaitForInitialization(); | ||||
|                            p->ReadMarkerSettings(); | ||||
| 
 | ||||
|                            Q_EMIT MarkersInitialized(p->markerRecords_.size()); | ||||
|                         } | ||||
|                         catch (const std::exception& ex) | ||||
|                         { | ||||
|  | @ -219,6 +221,7 @@ void MarkerManager::set_marker(size_t index, const types::MarkerInfo& marker) | |||
|    std::shared_ptr<MarkerManager::Impl::MarkerRecord>& markerRecord = | ||||
|       p->markerRecords_[index]; | ||||
|    markerRecord->markerInfo_ = marker; | ||||
|    Q_EMIT MarkerChanged(index); | ||||
|    Q_EMIT MarkersUpdated(); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -30,7 +30,9 @@ public: | |||
|    static std::shared_ptr<MarkerManager> Instance(); | ||||
| 
 | ||||
| signals: | ||||
|    void MarkersInitialized(size_t count); | ||||
|    void MarkersUpdated(); | ||||
|    void MarkerChanged(size_t index); | ||||
|    void MarkerAdded(); | ||||
|    void MarkerRemoved(size_t index); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AdenKoperczak
						AdenKoperczak