From 1da2961970cd0c54997d36bb51c2bde96cb5dac3 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sun, 18 Dec 2022 12:31:19 +0800 Subject: [PATCH] - fix: Project's "static link" option is overwrited by global compiler set settings, when project options dialog is opened. --- NEWS.md | 8 +++++--- RedPandaIDE/settings.cpp | 2 +- RedPandaIDE/settingsdialog/projectcompilerwidget.cpp | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/NEWS.md b/NEWS.md index ccc74a5f..40874f46 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,10 +1,10 @@ Red Panda C++ Version 2.7 - enhancement: Remove multiple problems in the problem set view - - enhancement: Clear the proble view after a new problem set created - - enhancement: "Trim trailing spaces" in options / editor / misc + - enhancement: Clear the problem view after a new problem set created + - enhancement: "Trim trailing spaces" (Before saving a file) in options / editor / misc - enhancement: "Trim trailing spaces" in code menu - - change: Don't auto disable compile and debug buttons. + - change: Don't auto disable compile and debug buttons for compiler sets that don't have compiler/debugger programs. - enhancement: Better error messages for missing compile/debug/make programs. - enhancement: "Show special chars" in options / editor / font - fix: Lost compiler set settings if a compiler set's bin dirs is empty. @@ -16,6 +16,8 @@ Red Panda C++ Version 2.7 - fix: "Compile" button disabled after app start with an empty new file. - enhancement: Don't add "-g3" option when generate assembely. - enhancement: Generate assembly is not correctly disabled when current file is not C/C++. + - change: Disable "Copy Limit" int "options"/"editor"/"Copy/Export" by default. + - fix: Project's "static link" option is overwrited by global compiler set settings, when project options dialog is opened. Red Panda C++ Version 2.6 diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index 4211f4a9..f7e2f015 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -1414,7 +1414,7 @@ void Settings::Editor::doLoad() mGutterFontOnlyMonospaced = boolValue("gutter_font_only_monospaced",true); //copy - mCopySizeLimit = boolValue("copy_limit",true); + mCopySizeLimit = boolValue("copy_limit",false); mCopyCharLimits = intValue("copy_char_limits",100); mCopyLineLimits = intValue("copy_line_limits",100000); #ifdef Q_OS_WIN diff --git a/RedPandaIDE/settingsdialog/projectcompilerwidget.cpp b/RedPandaIDE/settingsdialog/projectcompilerwidget.cpp index aa106693..27a0ba3f 100644 --- a/RedPandaIDE/settingsdialog/projectcompilerwidget.cpp +++ b/RedPandaIDE/settingsdialog/projectcompilerwidget.cpp @@ -47,6 +47,7 @@ void ProjectCompilerWidget::refreshOptions() ui->tabOptions->resetUI(pSet,mOptions); ui->chkStaticLink->setChecked(pSet->staticLink()); + ui->chkAddCharset->setChecked(pSet->autoAddCharsetParams()); QByteArray execEncoding = pMainWindow->project()->options().execEncoding; if (execEncoding == ENCODING_AUTO_DETECT @@ -72,11 +73,10 @@ void ProjectCompilerWidget::refreshOptions() void ProjectCompilerWidget::doLoad() { - ui->chkAddCharset->setChecked(pMainWindow->project()->options().addCharset); - ui->chkStaticLink->setChecked(pMainWindow->project()->options().staticLink); - mOptions = pMainWindow->project()->options().compilerOptions; ui->cbCompilerSet->setCurrentIndex(pMainWindow->project()->options().compilerSet); + ui->chkAddCharset->setChecked(pMainWindow->project()->options().addCharset); + ui->chkStaticLink->setChecked(pMainWindow->project()->options().staticLink); } void ProjectCompilerWidget::doSave()