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
d7e7c342
Commit
d7e7c342
authored
Nov 12, 2010
by
con
Browse files
Fix updating of menus with EA_Hide.
parent
59004d3d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/actionmanager/actioncontainer.cpp
View file @
d7e7c342
...
...
@@ -150,7 +150,7 @@ using namespace Core::Internal;
ActionContainerPrivate
::
ActionContainerPrivate
(
int
id
)
:
m_data
(
0
),
m_id
(
id
),
m_updateRequested
(
false
)
{
scheduleUpdate
();
}
void
ActionContainerPrivate
::
setEmptyAction
(
EmptyAction
ea
)
...
...
@@ -251,6 +251,7 @@ void ActionContainerPrivate::addAction(Command *action, int pos, bool setpos)
m_posmap
.
insert
(
pos
,
action
->
id
());
connect
(
action
,
SIGNAL
(
activeStateChanged
()),
this
,
SLOT
(
scheduleUpdate
()));
insertAction
(
ba
,
a
->
action
());
scheduleUpdate
();
}
void
ActionContainerPrivate
::
addMenu
(
ActionContainer
*
menu
,
int
pos
,
bool
setpos
)
...
...
@@ -271,6 +272,7 @@ void ActionContainerPrivate::addMenu(ActionContainer *menu, int pos, bool setpos
m_subContainers
.
append
(
menu
);
m_posmap
.
insert
(
pos
,
menu
->
id
());
insertMenu
(
ba
,
mc
->
menu
());
scheduleUpdate
();
}
QAction
*
ActionContainerPrivate
::
beforeAction
(
int
pos
,
int
*
prevKey
)
const
...
...
@@ -418,9 +420,9 @@ bool MenuActionContainer::updateInternal()
}
if
(
hasEmptyAction
(
EA_Hide
))
m_menu
->
setVisible
(
hasitems
);
m_menu
->
menuAction
()
->
setVisible
(
hasitems
);
else
if
(
hasEmptyAction
(
EA_Disable
))
m_menu
->
setEnabled
(
hasitems
);
m_menu
->
menuAction
()
->
setEnabled
(
hasitems
);
return
hasitems
;
}
...
...
src/plugins/coreplugin/actionmanager/actionmanager.cpp
View file @
d7e7c342
...
...
@@ -255,11 +255,6 @@ QList<Command *> ActionManagerPrivate::commands() const
return
result
;
}
QList
<
ActionContainerPrivate
*>
ActionManagerPrivate
::
containers
()
const
{
return
m_idContainerMap
.
values
();
}
bool
ActionManagerPrivate
::
hasContext
(
int
context
)
const
{
return
m_context
.
contains
(
context
);
...
...
src/plugins/coreplugin/actionmanager/actionmanager_p.h
View file @
d7e7c342
...
...
@@ -72,7 +72,6 @@ public:
QList
<
int
>
defaultGroups
()
const
;
QList
<
Command
*>
commands
()
const
;
QList
<
ActionContainerPrivate
*>
containers
()
const
;
bool
hasContext
(
int
context
)
const
;
...
...
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