mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 03:20:05 +00:00 
			
		
		
		
	Save radar smoothing state in settings
This commit is contained in:
		
							parent
							
								
									f010ea8fad
								
							
						
					
					
						commit
						cc0ebcd13c
					
				
					 2 changed files with 22 additions and 9 deletions
				
			
		|  | @ -1092,16 +1092,25 @@ void MainWindowImpl::ConnectOtherSignals() | |||
|                  } | ||||
|               } | ||||
|            }); | ||||
|    connect(mainWindow_->ui->smoothRadarDataCheckBox, | ||||
|            &QCheckBox::checkStateChanged, | ||||
|            mainWindow_, | ||||
|            [this](Qt::CheckState state) | ||||
|            { | ||||
|               bool smoothingEnabled = (state == Qt::CheckState::Checked); | ||||
|    connect( | ||||
|       mainWindow_->ui->smoothRadarDataCheckBox, | ||||
|       &QCheckBox::checkStateChanged, | ||||
|       mainWindow_, | ||||
|       [this](Qt::CheckState state) | ||||
|       { | ||||
|          bool smoothingEnabled = (state == Qt::CheckState::Checked); | ||||
| 
 | ||||
|               // Turn on smoothing
 | ||||
|               activeMap_->SetSmoothingEnabled(smoothingEnabled); | ||||
|            }); | ||||
|          auto it = std::find(maps_.cbegin(), maps_.cend(), activeMap_); | ||||
|          if (it != maps_.cend()) | ||||
|          { | ||||
|             std::size_t i = std::distance(maps_.cbegin(), it); | ||||
|             settings::MapSettings::Instance().smoothing_enabled(i).StageValue( | ||||
|                smoothingEnabled); | ||||
|          } | ||||
| 
 | ||||
|          // Turn on smoothing
 | ||||
|          activeMap_->SetSmoothingEnabled(smoothingEnabled); | ||||
|       }); | ||||
|    connect(mainWindow_->ui->trackLocationCheckBox, | ||||
|            &QCheckBox::checkStateChanged, | ||||
|            mainWindow_, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat