mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-21 05:44:06 +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
3 changed files with 13 additions and 9 deletions
|
@ -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
|
||||||
|
|
|
@ -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…
Reference in a new issue