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
2fba3888
Commit
2fba3888
authored
Nov 10, 2009
by
mae
Browse files
Fix combobox tooltip and lock-button visibility for empty editor views
Reviewed-by: con
parent
4e4adc86
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/editormanager/editorview.cpp
View file @
2fba3888
...
...
@@ -343,6 +343,7 @@ void EditorView::setCurrentEditor(IEditor *editor)
{
if
(
!
editor
||
m_container
->
count
()
<=
0
||
m_container
->
indexOf
(
editor
->
widget
())
==
-
1
)
{
updateEditorStatus
(
0
);
// ### TODO the combo box m_editorList should show an empty item
return
;
}
...
...
@@ -377,6 +378,13 @@ void EditorView::updateEditorStatus(IEditor *editor)
static
const
QIcon
lockedIcon
(
QLatin1String
(
":/core/images/locked.png"
));
static
const
QIcon
unlockedIcon
(
QLatin1String
(
":/core/images/unlocked.png"
));
m_lockButton
->
setVisible
(
editor
!=
0
);
if
(
!
editor
)
{
m_editorList
->
setToolTip
(
QString
());
return
;
}
if
(
editor
->
file
()
->
isReadOnly
())
{
m_lockButton
->
setIcon
(
lockedIcon
);
m_lockButton
->
setEnabled
(
!
editor
->
file
()
->
fileName
().
isEmpty
());
...
...
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