mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Remove seemingly unnecessary clearFocus() call (thanks scrawl for help). Fix saving window size on linux.
This commit is contained in:
parent
7675df60ba
commit
517a797a3e
@ -33,12 +33,22 @@ void CSVDoc::View::closeEvent (QCloseEvent *event)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// save window size first
|
// save window size first
|
||||||
|
int width = 0;
|
||||||
|
int height = 0;
|
||||||
|
|
||||||
|
#ifdef Q_WS_WIN
|
||||||
|
width = frameGeometry().width();
|
||||||
|
height = frameGeometry().height();
|
||||||
|
#else
|
||||||
|
width = geometry().width();
|
||||||
|
height = geometry().height();
|
||||||
|
#endif
|
||||||
CSMSettings::UserSettings::instance().setDefinitions(
|
CSMSettings::UserSettings::instance().setDefinitions(
|
||||||
"Window Size/Width",
|
"Window Size/Width",
|
||||||
QStringList(QString::number(frameGeometry().width())));
|
QStringList(QString::number(width)));
|
||||||
CSMSettings::UserSettings::instance().setDefinitions(
|
CSMSettings::UserSettings::instance().setDefinitions(
|
||||||
"Window Size/Height",
|
"Window Size/Height",
|
||||||
QStringList(QString::number(frameGeometry().height())));
|
QStringList(QString::number(height)));
|
||||||
CSMSettings::UserSettings::instance().saveDefinitions();
|
CSMSettings::UserSettings::instance().saveDefinitions();
|
||||||
|
|
||||||
// closeRequest() returns true if last document
|
// closeRequest() returns true if last document
|
||||||
|
@ -19,7 +19,7 @@ void CSVSettings::SettingWindow::createPages()
|
|||||||
QList <CSMSettings::Setting *> connectedSettings;
|
QList <CSMSettings::Setting *> connectedSettings;
|
||||||
|
|
||||||
foreach (const QString &pageName, pageMap.keys())
|
foreach (const QString &pageName, pageMap.keys())
|
||||||
{
|
{
|
||||||
QList <CSMSettings::Setting *> pageSettings = pageMap.value (pageName);
|
QList <CSMSettings::Setting *> pageSettings = pageMap.value (pageName);
|
||||||
|
|
||||||
mPages.append (new Page (pageName, pageSettings, this));
|
mPages.append (new Page (pageName, pageSettings, this));
|
||||||
@ -129,7 +129,3 @@ void CSVSettings::SettingWindow::saveSettings()
|
|||||||
mModel->saveDefinitions();
|
mModel->saveDefinitions();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVSettings::SettingWindow::closeEvent (QCloseEvent *event)
|
|
||||||
{
|
|
||||||
QApplication::focusWidget()->clearFocus();
|
|
||||||
}
|
|
||||||
|
@ -36,8 +36,6 @@ namespace CSVSettings {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual void closeEvent (QCloseEvent *event);
|
|
||||||
|
|
||||||
///construct the pages to be displayed in the dialog
|
///construct the pages to be displayed in the dialog
|
||||||
void createPages();
|
void createPages();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user