- change: When debugging, don't auto set focus to the editor.

This commit is contained in:
Roy Qu 2024-03-14 13:03:06 +08:00
parent 4810992ed3
commit ba9bbca010
3 changed files with 7 additions and 3 deletions

View File

@ -54,6 +54,7 @@ Red Panda C++ Version 2.27
- fix: Debugger console's background not correctly cleared before redrawn.
- enhancement: Make output in the debug console cleaner.
- enhancement: Execute the last debug command in the debug console if ENTER pressed.
- change: When debugging, don't auto set focus to the editor.
Red Panda C++ Version 2.26
- enhancement: Code suggestion for embedded std::vectors.

View File

@ -1152,7 +1152,7 @@ void MainWindow::setActiveBreakpoint(QString fileName, int Line, bool setFocus)
{
removeActiveBreakpoints();
// Then active the current line in the current file
Editor *e = openFile(fileName);
Editor *e = openFile(fileName, false);
if (e!=nullptr) {
e->setActiveBreakpointFocus(Line,setFocus);
if (setFocus) {
@ -2561,10 +2561,10 @@ void MainWindow::debug()
}
prepareDebugger();
QString filePath = debugFile.filePath().replace('\\','/');
QString newFilePath = debugFile.filePath().replace('\\','/');
if (!mDebugger->startClient(
pSettings->compilerSets().defaultIndex(),
filePath,
newFilePath,
true,
debugInferiorhasBreakpoint(),
binDirs,

View File

@ -3387,6 +3387,9 @@ void Settings::CompilerSets::loadSets()
mSettings->mSettings.beginGroup(SETTING_COMPILTER_SETS);
mDefaultIndex = mSettings->mSettings.value(SETTING_COMPILTER_SETS_DEFAULT_INDEX,-1).toInt();
mDefaultIndexTimeStamp = mSettings->mSettings.value(SETTING_COMPILTER_SETS_DEFAULT_INDEX_TIMESTAMP,0).toLongLong();
//fix error time
if (mDefaultIndexTimeStamp > QDateTime::currentMSecsSinceEpoch())
mDefaultIndexTimeStamp = QDateTime::currentMSecsSinceEpoch();
int listSize = mSettings->mSettings.value(SETTING_COMPILTER_SETS_COUNT,0).toInt();
mSettings->mSettings.endGroup();
bool loadError = false;