mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 07:10:05 +00:00 
			
		
		
		
	Mark favorites in radar site dialog
- No effect currently - Does not persist through application restart
This commit is contained in:
		
							parent
							
								
									e721633629
								
							
						
					
					
						commit
						9d673af291
					
				
					 6 changed files with 114 additions and 34 deletions
				
			
		|  | @ -70,9 +70,22 @@ RadarSiteDialog::RadarSiteDialog(QWidget* parent) : | |||
|            p->proxyModel_, | ||||
|            &QSortFilterProxyModel::setFilterWildcard); | ||||
|    connect(ui->radarSiteView, | ||||
|            &QTreeView::doubleClicked, | ||||
|            &QAbstractItemView::doubleClicked, | ||||
|            this, | ||||
|            [this]() { Q_EMIT accept(); }); | ||||
|    connect(ui->radarSiteView, | ||||
|            &QAbstractItemView::pressed, | ||||
|            this, | ||||
|            [this](const QModelIndex& index) | ||||
|            { | ||||
|               QModelIndex selectedIndex = p->proxyModel_->mapToSource(index); | ||||
| 
 | ||||
|               if (selectedIndex.column() == | ||||
|                   static_cast<int>(model::RadarSiteModel::Column::Favorite)) | ||||
|               { | ||||
|                  p->radarSiteModel_->ToggleFavorite(selectedIndex.row()); | ||||
|               } | ||||
|            }); | ||||
|    connect( | ||||
|       ui->radarSiteView->selectionModel(), | ||||
|       &QItemSelectionModel::selectionChanged, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat