From 029522880ff639d983a372648eb3c053bce8e9ce Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 19 Dec 2013 20:23:40 -0200 Subject: When saving / canceling edition, focus back to the Dive List When saving / canceling the edition, focus was still being kept on the current selected widget. not good. :) this patch makes the DiveList keep the focus after a edit. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qt-ui') diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 13f26e5bd..028627292 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -668,6 +668,7 @@ void MainTab::acceptChanges() mainWindow()->dive_list()->restoreSelection(); } mainWindow()->dive_list()->verticalScrollBar()->setSliderPosition(scrolledBy); + mainWindow()->dive_list()->setFocus(); } void MainTab::resetPallete() @@ -791,6 +792,7 @@ void MainTab::rejectChanges() mainWindow()->refreshDisplay(false); DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::NOTHING); } + mainWindow()->dive_list()->setFocus(); } #undef EDIT_TEXT2 -- cgit v1.2.3-70-g09d2