diff options
author | Chris Xiong <chirs241097@gmail.com> | 2017-02-13 17:31:42 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2017-02-13 17:31:42 +0800 |
commit | a0da9bca472043e7f13d4d6ea1809f6b63a598b0 (patch) | |
tree | f318a37656b5b25c4028739b8e59ebb4d132d34d /qmidiplayer-desktop/qmpplistwindow.cpp | |
parent | 3312e495cf54a8bd6451552216f5aeea1a06d486 (diff) | |
download | QMidiPlayer-a0da9bca472043e7f13d4d6ea1809f6b63a598b0.tar.xz |
Fix pitch bend range handling.
Allow registering a string option as file path.
Provide an easier way to set path values in options.
Revert to old geometry storage mechanism and improved
it. Hope this one will work on Windows.
Make the time slider less ugly.
Diffstat (limited to 'qmidiplayer-desktop/qmpplistwindow.cpp')
-rw-r--r-- | qmidiplayer-desktop/qmpplistwindow.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/qmidiplayer-desktop/qmpplistwindow.cpp b/qmidiplayer-desktop/qmpplistwindow.cpp index d010198..7185e5e 100644 --- a/qmidiplayer-desktop/qmpplistwindow.cpp +++ b/qmidiplayer-desktop/qmpplistwindow.cpp @@ -76,8 +76,8 @@ qmpPlistWindow::qmpPlistWindow(QWidget *parent) : 0, true ); - if(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/PListW",QByteArray()).toByteArray().length()) - restoreGeometry(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/PListW",QRect(-999,-999,-999,-999)).toByteArray()); + if(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/PListW",QRect(-999,-999,999,999)).toRect()!=QRect(-999,-999,999,999)) + setGeometry(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/PListW",QRect(-999,-999,999,999)).toRect()); if(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/PListWShown",0).toInt()) {show();qmpMainWindow::getInstance()->setFuncState("Playlist",true);} } @@ -95,14 +95,19 @@ void qmpPlistWindow::showEvent(QShowEvent *event) { qmpSettingsWindow::getSettingsIntf()->setValue("DialogStatus/PListWShown",1); } - if(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/PListW",QByteArray()).toByteArray().length()) - restoreGeometry(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/PListW",QRect(-999,-999,-999,-999)).toByteArray()); + if(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/PListW",QRect(-999,-999,999,999)).toRect()!=QRect(-999,-999,999,999)) + setGeometry(qmpSettingsWindow::getSettingsIntf()->value("DialogStatus/PListW",QRect(-999,-999,999,999)).toRect()); event->accept(); } void qmpPlistWindow::closeEvent(QCloseEvent *event) { + if(qmpSettingsWindow::getSettingsIntf()->value("Behavior/DialogStatus","").toInt()) + { + qmpSettingsWindow::getSettingsIntf()->setValue("DialogStatus/PListW",geometry()); + } setVisible(false); + if(!qmpMainWindow::getInstance()->isFinalizing()) while(ui->lwFiles->count()>1)delete ui->lwFiles->item(0); if(!qmpMainWindow::getInstance()->isFinalizing()&&qmpSettingsWindow::getSettingsIntf()->value("Behavior/DialogStatus","").toInt()) { @@ -124,15 +129,6 @@ void qmpPlistWindow::closeEvent(QCloseEvent *event) event->accept(); } -void qmpPlistWindow::moveEvent(QMoveEvent *event) -{ - if(qmpSettingsWindow::getSettingsIntf()->value("Behavior/DialogStatus","").toInt()) - { - qmpSettingsWindow::getSettingsIntf()->setValue("DialogStatus/PListW",saveGeometry()); - } - event->accept(); -} - void qmpPlistWindow::dropEvent(QDropEvent *event) { QList<QUrl> l=event->mimeData()->urls(); |