Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
bbfc1013
Commit
bbfc1013
authored
Mar 09, 2009
by
con
Browse files
Fixes: "Return to editor" functionality suboptimal in debug mode
parent
7b38d9c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/mainwindow.cpp
View file @
bbfc1013
...
...
@@ -803,10 +803,7 @@ void MainWindow::openFiles(const QStringList &fileNames)
void
MainWindow
::
setFocusToEditor
()
{
QWidget
*
focusWidget
=
qApp
->
focusWidget
();
// ### Duplicated code from EditMode::makeSureEditorManagerVisible
IMode
*
currentMode
=
m_coreImpl
->
modeManager
()
->
currentMode
();
if
(
currentMode
&&
currentMode
->
uniqueModeName
()
!=
QLatin1String
(
Constants
::
MODE_EDIT
)
&&
currentMode
->
uniqueModeName
()
!=
QLatin1String
(
"GdbDebugger.Mode.Debug"
))
if
(
!
EditorManager
::
instance
()
->
isVisible
())
{
m_coreImpl
->
modeManager
()
->
activateMode
(
QLatin1String
(
Constants
::
MODE_EDIT
));
}
...
...
@@ -814,11 +811,23 @@ void MainWindow::setFocusToEditor()
if
(
IEditor
*
editor
=
m_editorManager
->
currentEditor
())
editor
->
widget
()
->
setFocus
();
if
(
focusWidget
&&
focusWidget
==
qApp
->
focusWidget
())
{
if
(
FindToolBarPlaceHolder
::
getCurrent
())
FindToolBarPlaceHolder
::
getCurrent
()
->
hide
();
OutputPaneManager
::
instance
()
->
slotHide
();
RightPaneWidget
::
instance
()
->
setShown
(
false
);
bool
focusWasAlreadyInEditor
=
(
focusWidget
&&
focusWidget
==
qApp
->
focusWidget
());
if
(
focusWasAlreadyInEditor
)
{
bool
stuffVisible
=
(
FindToolBarPlaceHolder
::
getCurrent
()
&&
FindToolBarPlaceHolder
::
getCurrent
()
->
isVisible
())
||
(
OutputPanePlaceHolder
::
getCurrent
()
&&
OutputPanePlaceHolder
::
getCurrent
()
->
isVisible
())
||
(
RightPanePlaceHolder
::
current
()
&&
RightPanePlaceHolder
::
current
()
->
isVisible
());
if
(
stuffVisible
)
{
if
(
FindToolBarPlaceHolder
::
getCurrent
())
FindToolBarPlaceHolder
::
getCurrent
()
->
hide
();
OutputPaneManager
::
instance
()
->
slotHide
();
RightPaneWidget
::
instance
()
->
setShown
(
false
);
}
else
{
m_coreImpl
->
modeManager
()
->
activateMode
(
QLatin1String
(
Constants
::
MODE_EDIT
));
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment