[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE_3_2_BRANCH: kdelibs/kdeui
From: David Faure <faure () kde ! org>
Date: 2004-06-02 23:31:26
Message-ID: 20040602233126.0B65C126EB () office ! kde ! org
[Download RAW message or body]
CVS commit by faure:
Fixed window size being lost when just opening and closing kword.
This was due to d->defaultWindowSize being set to the current size in \
setAutoSaveSettings [called more than once]. In fact koffice even calls \
restoreWindowSettings first... Since it has the defaults, let's store the defaults \
from there, should work for all cases.
M +2 -4 kmainwindow.cpp 1.124.2.1
--- kdelibs/kdeui/kmainwindow.cpp #1.124:1.124.2.1
@@ -863,4 +863,6 @@ void KMainWindow::restoreWindowSize( KCo
int scnum = QApplication::desktop()->screenNumber(parentWidget());
QRect desk = QApplication::desktop()->screenGeometry(scnum);
+ if ( d->defaultWindowSize.isNull() ) // only once
+ d->defaultWindowSize = QRect(desk.width(), width(), desk.height(), \
height()); // store default values
QSize size( config->readNumEntry( QString::fromLatin1("Width \
%1").arg(desk.width()), 0 ),
config->readNumEntry( QString::fromLatin1("Height \
%1").arg(desk.height()), 0 ) ); @@ -938,8 +940,4 @@ void \
KMainWindow::setAutoSaveSettings( c this, SLOT( setSettingsDirty() ) );
- // Get default values
- int scnum = QApplication::desktop()->screenNumber(parentWidget());
- QRect desk = QApplication::desktop()->screenGeometry(scnum);
- d->defaultWindowSize = QRect(desk.width(), width(), desk.height(), height());
// Now read the previously saved settings
applyMainWindowSettings( KGlobal::config(), groupName );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic