mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 18:10:05 +00:00 
			
		
		
		
	Fixing intermittent elevation button resize issue
This commit is contained in:
		
							parent
							
								
									b2e75f3c1f
								
							
						
					
					
						commit
						8b515dd3d2
					
				
					 1 changed files with 9 additions and 3 deletions
				
			
		|  | @ -56,6 +56,7 @@ public: | ||||||
|    std::vector<map::MapWidget*> maps_; |    std::vector<map::MapWidget*> maps_; | ||||||
|    std::vector<float>           elevationCuts_; |    std::vector<float>           elevationCuts_; | ||||||
| 
 | 
 | ||||||
|  |    bool elevationButtonsChanged_; | ||||||
|    bool resizeElevationButtons_; |    bool resizeElevationButtons_; | ||||||
| 
 | 
 | ||||||
| public slots: | public slots: | ||||||
|  | @ -123,7 +124,11 @@ bool MainWindow::event(QEvent* event) | ||||||
| { | { | ||||||
|    if (event->type() == QEvent::Type::Paint) |    if (event->type() == QEvent::Type::Paint) | ||||||
|    { |    { | ||||||
|       if (p->resizeElevationButtons_) |       if (p->elevationButtonsChanged_) | ||||||
|  |       { | ||||||
|  |          p->elevationButtonsChanged_ = false; | ||||||
|  |       } | ||||||
|  |       else if (p->resizeElevationButtons_) | ||||||
|       { |       { | ||||||
|          // Set each elevation cut's tool button to the same size
 |          // Set each elevation cut's tool button to the same size
 | ||||||
|          int elevationCutMaxWidth = 0; |          int elevationCutMaxWidth = 0; | ||||||
|  | @ -367,8 +372,9 @@ void MainWindowImpl::UpdateRadarProductSettings() | ||||||
|          }); |          }); | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       elevationCuts_          = elevationCuts; |       elevationCuts_           = elevationCuts; | ||||||
|       resizeElevationButtons_ = true; |       elevationButtonsChanged_ = true; | ||||||
|  |       resizeElevationButtons_  = true; | ||||||
|    } |    } | ||||||
| 
 | 
 | ||||||
|    UpdateElevationSelection(currentElevation); |    UpdateElevationSelection(currentElevation); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat