- fix: Restore project's original compiler set if user choose 'No' in the confirm project compiler set change dialog.
This commit is contained in:
parent
3cbd323f97
commit
6bf443d3d8
1
NEWS.md
1
NEWS.md
|
@ -30,6 +30,7 @@ Red Panda C++ Version 2.0
|
|||
- enhancement: when new header in the project view, auto select basename in the filename dialog
|
||||
- enhancement: when add file in the project view, auto select basename in the filename dialog
|
||||
- change: Don't generate localized filename when new header/add file in the project view
|
||||
- fix: Restore project's original compiler set if user choose 'No' in the confirm project compiler set change dialog.
|
||||
|
||||
|
||||
Red Panda C++ Version 1.5
|
||||
|
|
|
@ -1493,9 +1493,9 @@ void MainWindow::updateCompilerSet()
|
|||
if ( !e || e->inProject()) {
|
||||
index = mProject->options().compilerSet;
|
||||
}
|
||||
}
|
||||
if (index < 0 || index>=mCompilerSet->count()) {
|
||||
index = pSettings->compilerSets().defaultIndex();
|
||||
if (index < 0 || index>=mCompilerSet->count()) {
|
||||
index = pSettings->compilerSets().defaultIndex();
|
||||
}
|
||||
}
|
||||
mCompilerSet->setCurrentIndex(index);
|
||||
mCompilerSet->blockSignals(false);
|
||||
|
@ -5030,7 +5030,10 @@ void MainWindow::onCompilerSetChanged(int index)
|
|||
if (index<0)
|
||||
return;
|
||||
Editor *e = mEditorList->getEditor();
|
||||
if (mProject && (!e || e->inProject())) {
|
||||
if ( mProject && (!e || e->inProject())
|
||||
) {
|
||||
if (index==mProject->options().compilerSet)
|
||||
return;
|
||||
if(QMessageBox::warning(
|
||||
e,
|
||||
tr("Change Project Compiler Set"),
|
||||
|
@ -5039,9 +5042,10 @@ void MainWindow::onCompilerSetChanged(int index)
|
|||
+ tr("Do you really want to do that?"),
|
||||
QMessageBox::Yes | QMessageBox::No,
|
||||
QMessageBox::No) != QMessageBox::Yes) {
|
||||
mCompilerSet->setCurrentIndex(mProject->options().compilerSet);
|
||||
return;
|
||||
}
|
||||
mProject->setCompilerSet(index);
|
||||
mProject->setCompilerSet(mProject->options().compilerSet);
|
||||
mProject->saveOptions();
|
||||
scanActiveProject(true);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue