aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-10-04 12:28:40 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-10-04 12:28:40 -0300
commita5b351ed720597ea62ee0254e60e47a4f87ce1d2 (patch)
treee7b3e369fa5c096b5f4eac264f8ebefafa903c20
parent7bd43bfaaf5fb444ea766aa90498de3f3b75aaaf (diff)
downloadsubsurface-a5b351ed720597ea62ee0254e60e47a4f87ce1d2.tar.gz
Fixed First run of subsurface - Start on Fullscreen.
For a new installation, subsurface will now start on fullscreen, this fixes the bug where subsurface would start using the interface file ( mainwindow.ui ) configured size, and that silly monster always changes when editing something. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
-rw-r--r--qt-ui/mainwindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index eda19164d..af83c21a3 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -16,6 +16,7 @@
#include <QFontMetrics>
#include <QWebView>
#include <QTableView>
+#include <QDesktopWidget>
#include "divelistview.h"
#include "starwidget.h"
@@ -503,7 +504,7 @@ void MainWindow::initialUiSetup()
int i;
settings.beginGroup("MainWindow");
- QSize sz = settings.value("size").value<QSize>();
+ QSize sz = settings.value("size", qApp->desktop()->size()).value<QSize>();
resize(sz);
ui.mainSplitter->restoreState(settings.value("mainSplitter").toByteArray());
ui.infoProfileSplitter->restoreState(settings.value("infoProfileSplitter").toByteArray());