]> git.lyx.org Git - lyx.git/commitdiff
restore (14087) save/load geometry logic of qt3
authorPeter Kümmel <syntheticpp@gmx.net>
Sun, 18 Jun 2006 09:05:41 +0000 (09:05 +0000)
committerPeter Kümmel <syntheticpp@gmx.net>
Sun, 18 Jun 2006 09:05:41 +0000 (09:05 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14140 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt3/QtView.C
src/frontends/qt3/lyx_gui.C

index 69c43f95d7d034639541bcb1e744f4301dbe4237..503cfb440c85c99897388a7b54ccbb69e96765cf 100644 (file)
@@ -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<string>(width()));
        session.saveSessionInfo("WindowHeight", convert<string>(height()));
index a91f7b43f465b97e5713a91b77f44ec75175d2a1..f58f5cf564bfb695829f5144d640959be7efe09f 100644 (file)
@@ -222,7 +222,7 @@ void parse_lyxrc()
 
 
 void start(string const & batch, vector<string> 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<string> 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