Skip to content
GitLab
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
5567a018
Commit
5567a018
authored
Mar 12, 2010
by
Lasse Holmstedt
Browse files
fixed issues with splitted editors
parent
d450bcd7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/editortoolbar.cpp
View file @
5567a018
...
...
@@ -34,6 +34,8 @@
#include
<coreplugin/icore.h>
#include
<coreplugin/minisplitter.h>
#include
<coreplugin/sidebar.h>
#include
<coreplugin/editormanager/editorview.h>
#include
<coreplugin/editormanager/editormanager.h>
#include
<coreplugin/editormanager/openeditorsmodel.h>
#include
<coreplugin/editormanager/ieditor.h>
...
...
@@ -142,9 +144,6 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
connect
(
m_lockButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
makeEditorWritable
()));
connect
(
m_closeButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
closeView
()),
Qt
::
QueuedConnection
);
EditorManager
*
em
=
EditorManager
::
instance
();
connect
(
em
,
SIGNAL
(
currentEditorChanged
(
Core
::
IEditor
*
)),
SLOT
(
updateEditorListSelection
(
Core
::
IEditor
*
)));
ActionManager
*
am
=
ICore
::
instance
()
->
actionManager
();
connect
(
am
->
command
(
Constants
::
CLOSE
),
SIGNAL
(
keySequenceChanged
()),
this
,
SLOT
(
updateActionShortcuts
()));
...
...
@@ -216,6 +215,10 @@ void EditorToolBar::updateToolBar(QWidget *toolBar)
void
EditorToolBar
::
setToolbarCreationFlags
(
ToolbarCreationFlags
flags
)
{
m_ignoreEditorToolbar
=
flags
&
FlagsIgnoreIEditorToolBar
;
if
(
m_ignoreEditorToolbar
)
{
EditorManager
*
em
=
EditorManager
::
instance
();
connect
(
em
,
SIGNAL
(
currentEditorChanged
(
Core
::
IEditor
*
)),
SLOT
(
updateEditorListSelection
(
Core
::
IEditor
*
)));
}
}
void
EditorToolBar
::
setCurrentEditor
(
IEditor
*
editor
)
...
...
@@ -232,9 +235,8 @@ void EditorToolBar::setCurrentEditor(IEditor *editor)
void
EditorToolBar
::
updateEditorListSelection
(
IEditor
*
newSelection
)
{
if
(
newSelection
)
{
if
(
newSelection
)
m_editorList
->
setCurrentIndex
(
m_editorsListModel
->
indexOf
(
newSelection
).
row
());
}
}
void
EditorToolBar
::
listSelectionActivated
(
int
row
)
...
...
src/plugins/coreplugin/editortoolbar.h
View file @
5567a018
...
...
@@ -46,6 +46,10 @@ namespace Core {
class
IEditor
;
class
OpenEditorsModel
;
namespace
Internal
{
class
EditorView
;
}
/**
* Fakes an IEditor-like toolbar for design mode widgets such as Qt Designer and Bauhaus.
...
...
@@ -120,6 +124,8 @@ private:
QWidget
*
m_defaultToolBar
;
bool
m_ignoreEditorToolbar
;
friend
class
Internal
::
EditorView
;
};
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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