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 <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2013-12-19 20:23:40 -02:00 committed by Dirk Hohndel
parent 29a19e2e84
commit 029522880f

View file

@ -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