mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Handle palette change for dive site selection
If you select a dive site with a different uuid than your current dive.dive_site_uuid, you should get a different pallete to state clearly that something changed. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7d863b5c28
commit
e4c0ee32cd
4 changed files with 24 additions and 3 deletions
|
@ -488,6 +488,7 @@ void DiveLocationLineEdit::itemActivated(const QModelIndex& index)
|
|||
qDebug() << "Setting a Existing dive site";
|
||||
if(view->isVisible())
|
||||
view->hide();
|
||||
emit diveSiteSelected(currUuid);
|
||||
}
|
||||
|
||||
void DiveLocationLineEdit::refreshDiveSiteCache()
|
||||
|
@ -580,11 +581,21 @@ void DiveLocationLineEdit::showPopup()
|
|||
if (!view->isVisible()) {
|
||||
setTemporaryDiveSiteName(text());
|
||||
proxy->invalidate();
|
||||
view->setCurrentIndex( view->model()->index(0,1));
|
||||
view->setCurrentIndex(view->model()->index(0,1));
|
||||
view->show();
|
||||
}
|
||||
}
|
||||
|
||||
DiveLocationLineEdit::DiveSiteType DiveLocationLineEdit::currDiveSiteType() const
|
||||
{
|
||||
return currType;
|
||||
}
|
||||
|
||||
uint32_t DiveLocationLineEdit::currDiveSiteUuid() const
|
||||
{
|
||||
return currUuid;
|
||||
}
|
||||
|
||||
DiveLocationListView::DiveLocationListView(QWidget *parent)
|
||||
{
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue