mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive list: propagate current-item to frontend
The command-objects select a current item, but this selection was not propagated to the front-end. The current item is the base for keyboard-navigation through the dive-list and therefore should be set correctly. It took some experimentation to get the flags right: QItemSelectionModel::Current Hopefully, these are the correct flags across all supported Qt versions! Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
b16be29595
commit
3c6cdfd8c0
6 changed files with 74 additions and 5 deletions
|
@ -530,10 +530,16 @@ void MainWindow::configureToolbar() {
|
|||
|
||||
void MainWindow::selectionChanged()
|
||||
{
|
||||
graphics()->plotDive(nullptr, false, true);
|
||||
information()->updateDiveInfo();
|
||||
configureToolbar();
|
||||
MapWidget::instance()->reload();
|
||||
if (!current_dive) {
|
||||
information()->clearTabs();
|
||||
information()->updateDiveInfo(true);
|
||||
graphics()->setEmptyState();
|
||||
} else {
|
||||
graphics()->plotDive(nullptr, false, true);
|
||||
information()->updateDiveInfo();
|
||||
configureToolbar();
|
||||
MapWidget::instance()->reload();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_actionNew_triggered()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue