mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-28 04:46:54 -08:00
Improve selection handling in edit icon widget.
This commit is contained in:
1 parent
3738115b6d
commit
887e4067ec
1 file changed
+10
@@ -459,6 +459,11 @@ void EditEntryWidget::updateIndexDefaultIcons(bool check)
|
||||
if (!index.isValid()) {
|
||||
m_iconsUi->defaultIconsView->setCurrentIndex(m_defaultIconModel->index(0, 0));
|
||||
}
|
||||
else {
|
||||
m_iconsUi->defaultIconsView->selectionModel()->
|
||||
setCurrentIndex(index, QItemSelectionModel::ClearAndSelect);
|
||||
}
|
||||
m_iconsUi->customIconsView->selectionModel()->clearSelection();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -469,6 +474,11 @@ void EditEntryWidget::updateIndexCustomIcons(bool check)
|
||||
if (!index.isValid()) {
|
||||
m_iconsUi->customIconsView->setCurrentIndex(m_customIconModel->index(0, 0));
|
||||
}
|
||||
else {
|
||||
m_iconsUi->customIconsView->selectionModel()->
|
||||
setCurrentIndex(index, QItemSelectionModel::ClearAndSelect);
|
||||
}
|
||||
m_iconsUi->defaultIconsView->selectionModel()->clearSelection();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user