mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-14 00:39:53 -05:00
Improve selection handling in edit icon widget.
This commit is contained in:
parent
3738115b6d
commit
887e4067ec
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user