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
109d8eaa
Commit
109d8eaa
authored
Sep 16, 2010
by
dt
Browse files
Session Manager: Default Mode for new Sessions is Edit
parent
af4ebe49
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/session.cpp
View file @
109d8eaa
...
...
@@ -41,6 +41,7 @@
#include <coreplugin/filemanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/progressmanager/progressmanager.h>
#include <coreplugin/modemanager.h>
...
...
@@ -590,6 +591,9 @@ bool SessionManager::createImpl(const QString &fileName)
m_file
=
new
SessionFile
;
m_file
->
setFileName
(
fileName
);
setStartupProject
(
0
);
m_core
->
modeManager
()
->
activateMode
(
Core
::
Constants
::
MODE_EDIT
);
m_core
->
modeManager
()
->
setFocusToCurrentMode
();
}
m_virginSession
=
true
;
...
...
@@ -657,11 +661,12 @@ bool SessionManager::loadImpl(const QString &fileName)
if
(
success
)
{
// restore the active mode
const
QString
&
modeIdentifier
=
value
(
QLatin1String
(
"ActiveMode"
)).
toString
();
if
(
!
modeIdentifier
.
isEmpty
())
{
m_core
->
modeManager
()
->
activateMode
(
modeIdentifier
);
m_core
->
modeManager
()
->
setFocusToCurrentMode
();
}
QString
modeIdentifier
=
value
(
QLatin1String
(
"ActiveMode"
)).
toString
();
if
(
modeIdentifier
.
isEmpty
())
modeIdentifier
=
Core
::
Constants
::
MODE_EDIT
;
m_core
->
modeManager
()
->
activateMode
(
modeIdentifier
);
m_core
->
modeManager
()
->
setFocusToCurrentMode
();
}
if
(
debug
)
...
...
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