diff --git a/NEWS.md b/NEWS.md index a7cc3a27..9f51aec6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,7 @@ Version 0.7.6 - change: Don't use 'pause' in the console pauser, in case of privilege problems. - enhancement: correctly handle auto indents for statement span many lines; - enhancment: only use colors have good contrasts with the background in the class browser and code completion suggestion window + - fix: bottom and left panel properties not correctly saved when hiding the main window Version 0.7.5 - enhancement: more accurate auto indent calculation diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index 01ff5025..4c20a289 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -1380,9 +1380,6 @@ void MainWindow::debug() case CompileTarget::None: return; case CompileTarget::File: -// if (mCompiler->useRunParams) { - -// } mDebugger->sendCommand("run",params); mDebugger->updateDebugInfo(); break; @@ -3024,6 +3021,17 @@ void MainWindow::showEvent(QShowEvent *) } } +void MainWindow::hideEvent(QHideEvent *) +{ + Settings::UI& settings = pSettings->ui(); + settings.setBottomPanelIndex(ui->tabMessages->currentIndex()); + settings.setBottomPanelOpenned(mBottomPanelOpenned); + settings.setBottomPanelHeight(mBottomPanelHeight); + settings.setLeftPanelIndex(ui->tabInfos->currentIndex()); + settings.setLeftPanelOpenned(mLeftPanelOpenned); + settings.setLeftPanelWidth(mLeftPanelWidth); +} + //void MainWindow::dragEnterEvent(QDragEnterEvent *event) //{ // if (event->mimeData()->hasUrls()){