- fix: bottom and left panel properties not correctly saved when hiding the main window

This commit is contained in:
royqh1979 2021-10-31 09:21:38 +08:00
parent 7b0b7c1413
commit 43a1b6074a
2 changed files with 12 additions and 3 deletions

View File

@ -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

View File

@ -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()){