mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 01:10:04 +00:00 
			
		
		
		
	Update placefile view when placefiles are edited from settings
This commit is contained in:
		
							parent
							
								
									7c21ccaf41
								
							
						
					
					
						commit
						6dedce5089
					
				
					 2 changed files with 36 additions and 3 deletions
				
			
		|  | @ -1,5 +1,6 @@ | |||
| #include <scwx/qt/map/map_widget.hpp> | ||||
| #include <scwx/qt/gl/gl.hpp> | ||||
| #include <scwx/qt/manager/placefile_manager.hpp> | ||||
| #include <scwx/qt/manager/radar_product_manager.hpp> | ||||
| #include <scwx/qt/manager/settings_manager.hpp> | ||||
| #include <scwx/qt/map/alert_layer.hpp> | ||||
|  | @ -94,6 +95,8 @@ public: | |||
| 
 | ||||
|       // Set Map Provider Details
 | ||||
|       mapProvider_ = GetMapProvider(generalSettings.map_provider().GetValue()); | ||||
| 
 | ||||
|       ConnectSignals(); | ||||
|    } | ||||
| 
 | ||||
|    ~MapWidgetImpl() | ||||
|  | @ -115,6 +118,7 @@ public: | |||
|    void AddLayer(const std::string&            id, | ||||
|                  std::shared_ptr<GenericLayer> layer, | ||||
|                  const std::string&            before = {}); | ||||
|    void ConnectSignals(); | ||||
|    void InitializeNewRadarProductView(const std::string& colorPalette); | ||||
|    void RadarProductManagerConnect(); | ||||
|    void RadarProductManagerDisconnect(); | ||||
|  | @ -142,6 +146,8 @@ public: | |||
|    std::string   imGuiContextName_; | ||||
|    bool          imGuiRendererInitialized_; | ||||
| 
 | ||||
|    std::shared_ptr<manager::PlacefileManager> placefileManager_ { | ||||
|       manager::PlacefileManager::Instance()}; | ||||
|    std::shared_ptr<manager::RadarProductManager> radarProductManager_; | ||||
| 
 | ||||
|    std::shared_ptr<common::ColorTable> colorTable_; | ||||
|  | @ -188,6 +194,22 @@ MapWidget::~MapWidget() | |||
|    makeCurrent(); | ||||
| } | ||||
| 
 | ||||
| void MapWidgetImpl::ConnectSignals() | ||||
| { | ||||
|    connect(placefileManager_.get(), | ||||
|            &manager::PlacefileManager::PlacefileEnabled, | ||||
|            widget_, | ||||
|            [this]() { widget_->update(); }); | ||||
|    connect(placefileManager_.get(), | ||||
|            &manager::PlacefileManager::PlacefileRenamed, | ||||
|            widget_, | ||||
|            [this]() { widget_->update(); }); | ||||
|    connect(placefileManager_.get(), | ||||
|            &manager::PlacefileManager::PlacefileUpdated, | ||||
|            widget_, | ||||
|            [this]() { widget_->update(); }); | ||||
| } | ||||
| 
 | ||||
| common::Level3ProductCategoryMap MapWidget::GetAvailableLevel3Categories() | ||||
| { | ||||
|    if (p->radarProductManager_ != nullptr) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat