Fix inconsistent position of screen splitters

I basically rewrote the way we handled the splitters. It now uses a state
to know what it's doing, and will only update the value of the
saved-to-disk splitter size if the state shows the splitters (currently
only VIEWALL), where all the other states should hide the splitters, and
the values of the splitters don't matter.

Fixes #225

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2013-11-07 11:37:27 -05:00 committed by Dirk Hohndel
parent 460aa4c1bd
commit d84cdb655e
2 changed files with 55 additions and 30 deletions

View file

@ -36,6 +36,7 @@ public:
enum {COLLAPSED, EXPANDED};
enum StackWidgetIndexes{ PROFILE, PLANNERPROFILE};
enum InfoWidgetIndexes{ MAINTAB, PLANNERWIDGET};
enum CurrentState{ VIEWALL, GLOBE_MAXIMIZED, INFO_MAXIMIZED, PROFILE_MAXIMIZED, LIST_MAXIMIZED};
MainWindow();
ProfileGraphicsView *graphics();
@ -116,12 +117,15 @@ private:
QAction *actionNextDive;
QAction *actionPreviousDive;
QWebView *helpView;
CurrentState state;
QString filter();
bool askSaveChanges();
void writeSettings();
void redrawProfile();
void file_save();
void file_save_as();
void beginChangeState(CurrentState s);
void saveSplitterSizes();
};
MainWindow *mainWindow();