From 1ec4d260385d8b99d5cbce5571b1d18cf888859b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20K=C3=BCmmel?= Date: Sun, 18 Jun 2006 09:05:41 +0000 Subject: [PATCH] restore (14087) save/load geometry logic of qt3 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14140 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt3/QtView.C | 4 ++-- src/frontends/qt3/lyx_gui.C | 12 ++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/frontends/qt3/QtView.C b/src/frontends/qt3/QtView.C index 69c43f95d7..503cfb440c 100644 --- a/src/frontends/qt3/QtView.C +++ b/src/frontends/qt3/QtView.C @@ -58,6 +58,8 @@ int const statusbar_timer_value = 3000; QtView::QtView(unsigned int width, unsigned int height) : QMainWindow(), LyXView(), commandbuffer_(0) { + resize(width, height); + qApp->setMainWidget(this); bufferview_.reset(new BufferView(this, width, height)); @@ -160,8 +162,6 @@ void QtView::closeEvent(QCloseEvent *) { Session & session = LyX::ref().session(); session.saveSessionInfo("WindowIsMaximized", (isMaximized() ? "yes" : "no")); - // don't save maximized values - showNormal(); // save windows size and position session.saveSessionInfo("WindowWidth", convert(width())); session.saveSessionInfo("WindowHeight", convert(height())); diff --git a/src/frontends/qt3/lyx_gui.C b/src/frontends/qt3/lyx_gui.C index a91f7b43f4..f58f5cf564 100644 --- a/src/frontends/qt3/lyx_gui.C +++ b/src/frontends/qt3/lyx_gui.C @@ -222,7 +222,7 @@ void parse_lyxrc() void start(string const & batch, vector const & files, - unsigned int width, unsigned int height, int posx, int posy, bool maximize) + unsigned int width, unsigned int height, int posx, int posy, bool) { // this can't be done before because it needs the Languages object initEncodings(); @@ -232,15 +232,11 @@ void start(string const & batch, vector const & files, QtView & view = *view_ptr.get(); - view.init(); - - if (posx != -1 && posy != -1) { - view.setGeometry(posx, posy, width, height); - if (maximize) - view.setWindowState(Qt::WindowMaximized); - } + if (posx != -1 && posy != -1) + view.move(QPoint(posx, posy)); view.show(); + view.init(); // FIXME: some code below needs moving -- 2.39.2