mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 06:40:05 +00:00 
			
		
		
		
	Change connection type for MouseCoordinateChanged slot to queued to avoid recursive paint
This commit is contained in:
		
							parent
							
								
									e2bb6563dc
								
							
						
					
					
						commit
						6cc797ca3a
					
				
					 2 changed files with 25 additions and 13 deletions
				
			
		|  | @ -745,7 +745,8 @@ void MainWindowImpl::ConnectMapSignals() | ||||||
|                  } |                  } | ||||||
|               }); |               }); | ||||||
| 
 | 
 | ||||||
|       connect(mapWidget, |       connect( | ||||||
|  |          mapWidget, | ||||||
|          &map::MapWidget::MouseCoordinateChanged, |          &map::MapWidget::MouseCoordinateChanged, | ||||||
|          this, |          this, | ||||||
|          [this](common::Coordinate coordinate) |          [this](common::Coordinate coordinate) | ||||||
|  | @ -758,7 +759,8 @@ void MainWindowImpl::ConnectMapSignals() | ||||||
|             coordinateLabel_->setText( |             coordinateLabel_->setText( | ||||||
|                QString("%1, %2").arg(latitude).arg(longitude)); |                QString("%1, %2").arg(latitude).arg(longitude)); | ||||||
|             coordinateLabel_->setVisible(true); |             coordinateLabel_->setVisible(true); | ||||||
|               }); |          }, | ||||||
|  |          Qt::QueuedConnection); | ||||||
| 
 | 
 | ||||||
|       connect( |       connect( | ||||||
|          mapWidget, |          mapWidget, | ||||||
|  |  | ||||||
|  | @ -148,7 +148,17 @@ signals: | ||||||
|                              double bearing, |                              double bearing, | ||||||
|                              double pitch); |                              double pitch); | ||||||
|    void MapStyleChanged(const std::string& styleName); |    void MapStyleChanged(const std::string& styleName); | ||||||
|  | 
 | ||||||
|  |    /**
 | ||||||
|  |     * This signal is emitted when the mouse moves to a different geographic | ||||||
|  |     * coordinate within the map widget. This signal is emitted during paintGL(), | ||||||
|  |     * and must be connected using a connection type of queued if the slot | ||||||
|  |     * triggers a repaint. | ||||||
|  |     * | ||||||
|  |     * @param [in] coordinate Geographic coordinate of the mouse | ||||||
|  |     */ | ||||||
|    void MouseCoordinateChanged(common::Coordinate coordinate); |    void MouseCoordinateChanged(common::Coordinate coordinate); | ||||||
|  | 
 | ||||||
|    void RadarSiteRequested(const std::string& id); |    void RadarSiteRequested(const std::string& id); | ||||||
|    void RadarSiteUpdated(std::shared_ptr<config::RadarSite> radarSite); |    void RadarSiteUpdated(std::shared_ptr<config::RadarSite> radarSite); | ||||||
|    void RadarSweepUpdated(); |    void RadarSweepUpdated(); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat