Remove seemingly unnecessary clearFocus() call (thanks scrawl for help). Fix saving window size on linux.

deque
cc9cii 10 years ago
parent 7675df60ba
commit 517a797a3e

@ -33,12 +33,22 @@ void CSVDoc::View::closeEvent (QCloseEvent *event)
else
{
// 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(
"Window Size/Width",
QStringList(QString::number(frameGeometry().width())));
QStringList(QString::number(width)));
CSMSettings::UserSettings::instance().setDefinitions(
"Window Size/Height",
QStringList(QString::number(frameGeometry().height())));
QStringList(QString::number(height)));
CSMSettings::UserSettings::instance().saveDefinitions();
// closeRequest() returns true if last document

@ -19,7 +19,7 @@ void CSVSettings::SettingWindow::createPages()
QList <CSMSettings::Setting *> connectedSettings;
foreach (const QString &pageName, pageMap.keys())
{
{
QList <CSMSettings::Setting *> pageSettings = pageMap.value (pageName);
mPages.append (new Page (pageName, pageSettings, this));
@ -129,7 +129,3 @@ void CSVSettings::SettingWindow::saveSettings()
mModel->saveDefinitions();
}
void CSVSettings::SettingWindow::closeEvent (QCloseEvent *event)
{
QApplication::focusWidget()->clearFocus();
}

@ -36,8 +36,6 @@ namespace CSVSettings {
protected:
virtual void closeEvent (QCloseEvent *event);
///construct the pages to be displayed in the dialog
void createPages();

Loading…
Cancel
Save