From ca4687c7cd19539e7c714e4b9c124013aa263764 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sat, 27 Aug 2022 11:07:48 +0800 Subject: [PATCH] fix: don't clear symbol table when minimized --- RedPandaIDE/editor.cpp | 12 +++++++----- RedPandaIDE/settings.cpp | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index de501e66..6f37c717 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -1279,10 +1279,10 @@ void Editor::closeEvent(QCloseEvent *) void Editor::showEvent(QShowEvent */*event*/) { - if (pSettings->codeCompletion().clearWhenEditorHidden() - && !inProject()) { - initParser(); - } +// if (pSettings->codeCompletion().clearWhenEditorHidden() +// && !inProject()) { +//// initParser(); +// } if (mParser && !pMainWindow->isClosingAll() && !pMainWindow->isQuitting() && !mParser->isFileParsed(mFilename) @@ -1311,8 +1311,10 @@ void Editor::hideEvent(QHideEvent */*event*/) &SynEdit::invalidate); } if (pSettings->codeCompletion().clearWhenEditorHidden() - && !inProject() && mParser) + && !inProject() && mParser + && !pMainWindow->isMinimized()) { mParser->reset(); + } setHideTime(QDateTime::currentDateTime()); } diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index 1e417e4d..dc4c34bb 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -3886,7 +3886,7 @@ void Settings::CodeCompletion::doLoad() statex.dwLength = sizeof (statex); GlobalMemoryStatusEx (&statex); - if (statex.ullAvailPhys > (long long int)3*1024*1024*1024) { + if (statex.ullAvailPhys > (long long int)10*1024*1024*1024) { doClear = false; } #endif