mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 06:10:04 +00:00 
			
		
		
		
	Disable auto-refresh on file load
This commit is contained in:
		
							parent
							
								
									0b040e8b75
								
							
						
					
					
						commit
						b9531149de
					
				
					 4 changed files with 17 additions and 5 deletions
				
			
		|  | @ -276,6 +276,7 @@ void MainWindow::on_actionOpen_triggered() | ||||||
| 
 | 
 | ||||||
|                if (record != nullptr) |                if (record != nullptr) | ||||||
|                { |                { | ||||||
|  |                   currentMap->SetAutoRefresh(false); | ||||||
|                   currentMap->SelectRadarProduct(record); |                   currentMap->SelectRadarProduct(record); | ||||||
|                } |                } | ||||||
|                else |                else | ||||||
|  |  | ||||||
|  | @ -356,6 +356,19 @@ void MapWidget::SetActive(bool isActive) | ||||||
|    update(); |    update(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void MapWidget::SetAutoRefresh(bool enabled) | ||||||
|  | { | ||||||
|  |    if (p->autoRefreshEnabled_ != enabled) | ||||||
|  |    { | ||||||
|  |       p->autoRefreshEnabled_ = enabled; | ||||||
|  | 
 | ||||||
|  |       if (p->autoRefreshEnabled_) | ||||||
|  |       { | ||||||
|  |          p->radarProductManager_->EnableLevel2Refresh(true); | ||||||
|  |       } | ||||||
|  |    } | ||||||
|  | } | ||||||
|  | 
 | ||||||
| void MapWidget::SetMapParameters( | void MapWidget::SetMapParameters( | ||||||
|    double latitude, double longitude, double zoom, double bearing, double pitch) |    double latitude, double longitude, double zoom, double bearing, double pitch) | ||||||
| { | { | ||||||
|  | @ -721,10 +734,7 @@ void MapWidgetImpl::SetRadarSite(const std::string& radarSite) | ||||||
|       radarProductManager_ = manager::RadarProductManager::Instance(radarSite); |       radarProductManager_ = manager::RadarProductManager::Instance(radarSite); | ||||||
| 
 | 
 | ||||||
|       // Connect signals to new RadarProductManager
 |       // Connect signals to new RadarProductManager
 | ||||||
|       if (autoRefreshEnabled_) |       AutoRefreshConnect(); | ||||||
|       { |  | ||||||
|          AutoRefreshConnect(); |  | ||||||
|       } |  | ||||||
|    } |    } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -45,6 +45,7 @@ public: | ||||||
|    void SelectRadarProduct(common::Level2Product product); |    void SelectRadarProduct(common::Level2Product product); | ||||||
|    void SelectRadarProduct(std::shared_ptr<types::RadarProductRecord> record); |    void SelectRadarProduct(std::shared_ptr<types::RadarProductRecord> record); | ||||||
|    void SetActive(bool isActive); |    void SetActive(bool isActive); | ||||||
|  |    void SetAutoRefresh(bool enabled); | ||||||
|    void SetMapParameters(double latitude, |    void SetMapParameters(double latitude, | ||||||
|                          double longitude, |                          double longitude, | ||||||
|                          double zoom, |                          double zoom, | ||||||
|  |  | ||||||
|  | @ -102,7 +102,7 @@ | ||||||
| <context> | <context> | ||||||
|     <name>scwx::qt::main::MainWindow</name> |     <name>scwx::qt::main::MainWindow</name> | ||||||
|     <message> |     <message> | ||||||
|         <location filename="../source/scwx/qt/main/main_window.cpp" line="286"/> |         <location filename="../source/scwx/qt/main/main_window.cpp" line="287"/> | ||||||
|         <source>Unrecognized NEXRAD Product:</source> |         <source>Unrecognized NEXRAD Product:</source> | ||||||
|         <translation type="unfinished"></translation> |         <translation type="unfinished"></translation> | ||||||
|     </message> |     </message> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat