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
Tobias Hunger
qt-creator
Commits
904ee4b5
Commit
904ee4b5
authored
Feb 18, 2010
by
Christiaan Janssen
Browse files
QmlDesigner.Navigator: Root item cannot be hidden
parent
a09b4811
Changes
2
Show whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp
View file @
904ee4b5
...
...
@@ -208,6 +208,9 @@ NavigatorTreeModel::ItemRow NavigatorTreeModel::createItemRow(const ModelNode &n
visibilityItem
->
setCheckable
(
true
);
visibilityItem
->
setEditable
(
false
);
visibilityItem
->
setData
(
hash
,
Qt
::
UserRole
);
if
(
node
.
isRootNode
())
{
visibilityItem
->
setEnabled
(
false
);
}
#ifdef _LOCK_ITEMS_
return
ItemRow
(
idItem
,
lockItem
,
visibilityItem
);
...
...
src/plugins/qmldesigner/components/navigator/navigatortreeview.cpp
View file @
904ee4b5
...
...
@@ -108,6 +108,8 @@ void IconCheckboxItemDelegate::paint(QPainter *painter,
if
(
option
.
state
&
QStyle
::
State_Selected
)
drawSelectionBackground
(
painter
,
option
);
if
(
!
m_TreeModel
->
nodeForIndex
(
index
).
isRootNode
())
{
bool
isChecked
=
(
m_TreeModel
->
itemFromIndex
(
index
)
->
checkState
()
==
Qt
::
Checked
);
if
(
m_TreeModel
->
isNodeInvisible
(
index
))
...
...
@@ -117,7 +119,7 @@ void IconCheckboxItemDelegate::paint(QPainter *painter,
painter
->
drawPixmap
(
option
.
rect
.
x
()
+
2
,
option
.
rect
.
y
()
+
5
,
onPix
);
else
painter
->
drawPixmap
(
option
.
rect
.
x
()
+
2
,
option
.
rect
.
y
()
+
5
,
offPix
);
}
painter
->
restore
();
}
...
...
Write
Preview
Markdown
is supported
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