diff options
Diffstat (limited to 'qmidiplayer-desktop/qmpefxwindow.cpp')
-rw-r--r-- | qmidiplayer-desktop/qmpefxwindow.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/qmidiplayer-desktop/qmpefxwindow.cpp b/qmidiplayer-desktop/qmpefxwindow.cpp index 507880e..6546547 100644 --- a/qmidiplayer-desktop/qmpefxwindow.cpp +++ b/qmidiplayer-desktop/qmpefxwindow.cpp @@ -36,8 +36,8 @@ qmpEfxWindow::qmpEfxWindow(QWidget *parent) : 0, true ); - if(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/EfxW",QByteArray()).toByteArray().length()) - restoreGeometry(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/EfxW",QRect(-999,-999,-999,-999)).toByteArray()); + if(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/EfxW",QRect(-999,-999,999,999)).toRect()!=QRect(-999,-999,999,999)) + setGeometry(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/EfxW",QRect(-999,-999,999,999)).toRect()); if(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/EfxWShown",0).toInt()) {show();qmpMainWindow::getInstance()->setFuncState("Effects",true);} } @@ -52,6 +52,10 @@ qmpEfxWindow::~qmpEfxWindow() void qmpEfxWindow::closeEvent(QCloseEvent *event) { + if(qmpSettingsWindow::getSettingsIntf()->value("Behavior/DialogStatus","").toInt()) + { + qmpSettingsWindow::getSettingsIntf()->setValue("DialogStatus/EfxW",geometry()); + } setVisible(false); if(!qmpMainWindow::getInstance()->isFinalizing()&&qmpSettingsWindow::getSettingsIntf()->value("Behavior/DialogStatus","").toInt()) { @@ -82,8 +86,8 @@ void qmpEfxWindow::showEvent(QShowEvent *event) if(ct==FLUID_CHORUS_MOD_SINE)ui->rbSine->setChecked(true),ui->rbTriangle->setChecked(false); if(ct==FLUID_CHORUS_MOD_TRIANGLE)ui->rbSine->setChecked(false),ui->rbTriangle->setChecked(true); initialized=true; - if(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/EfxW",QByteArray()).toByteArray().length()) - restoreGeometry(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/EfxW",QRect(-999,-999,-999,-999)).toByteArray()); + if(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/EfxW",QRect(-999,-999,999,999)).toRect()!=QRect(-999,-999,999,999)) + setGeometry(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/EfxW",QRect(-999,-999,999,999)).toRect()); if(qmpSettingsWindow::getSettingsIntf()->value("Behavior/DialogStatus","").toInt()) { qmpSettingsWindow::getSettingsIntf()->setValue("DialogStatus/EfxWShown",1); @@ -91,15 +95,6 @@ void qmpEfxWindow::showEvent(QShowEvent *event) event->accept(); } -void qmpEfxWindow::moveEvent(QMoveEvent *event) -{ - if(qmpSettingsWindow::getSettingsIntf()->value("Behavior/DialogStatus","").toInt()) - { - qmpSettingsWindow::getSettingsIntf()->setValue("DialogStatus/EfxW",saveGeometry()); - } - event->accept(); -} - void qmpEfxWindow::sendEfxChange() { if(!qmpMainWindow::getInstance()||!initialized)return; |