- fix: When debugging project, the executing source file is not auto switched to. (#476)
This commit is contained in:
parent
b9f36558ba
commit
785614607c
2
NEWS.md
2
NEWS.md
|
@ -9,6 +9,8 @@ Red Panda C++ Version 3.2
|
||||||
- fix: Crash in windows 7. (by CyanoHao)
|
- fix: Crash in windows 7. (by CyanoHao)
|
||||||
- fix: While Control is pressed, can't start Drag&Drop by mouse.
|
- fix: While Control is pressed, can't start Drag&Drop by mouse.
|
||||||
- enhancement: Auto detect gdb ACP (by CyanoHao)
|
- enhancement: Auto detect gdb ACP (by CyanoHao)
|
||||||
|
- fix: When debugging project, the executing source file is not auto switched to. (#476)
|
||||||
|
|
||||||
|
|
||||||
Red Panda C++ Version 3.1
|
Red Panda C++ Version 3.1
|
||||||
|
|
||||||
|
|
|
@ -608,10 +608,11 @@ void Editor::setFilename(const QString &newName)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Editor::activate()
|
void Editor::activate(bool focus)
|
||||||
{
|
{
|
||||||
if (mParentPageControl)
|
if (mParentPageControl)
|
||||||
mParentPageControl->setCurrentWidget(this);
|
mParentPageControl->setCurrentWidget(this);
|
||||||
|
if (focus)
|
||||||
setFocus();
|
setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ public:
|
||||||
bool save(bool force=false, bool reparse=true);
|
bool save(bool force=false, bool reparse=true);
|
||||||
bool saveAs(const QString& name="", bool fromProject = false);
|
bool saveAs(const QString& name="", bool fromProject = false);
|
||||||
void setFilename(const QString& newName);
|
void setFilename(const QString& newName);
|
||||||
void activate();
|
void activate(bool focus=true);
|
||||||
|
|
||||||
QTabWidget* pageControl() noexcept;
|
QTabWidget* pageControl() noexcept;
|
||||||
void setPageControl(QTabWidget* newPageControl);
|
void setPageControl(QTabWidget* newPageControl);
|
||||||
|
|
|
@ -1163,6 +1163,7 @@ void MainWindow::setActiveBreakpoint(QString fileName, int Line, bool setFocus)
|
||||||
Editor *e = openFile(fileName, false);
|
Editor *e = openFile(fileName, false);
|
||||||
if (e!=nullptr) {
|
if (e!=nullptr) {
|
||||||
e->setActiveBreakpointFocus(Line,setFocus);
|
e->setActiveBreakpointFocus(Line,setFocus);
|
||||||
|
e->activate(false);
|
||||||
if (setFocus) {
|
if (setFocus) {
|
||||||
activateWindow();
|
activateWindow();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue