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
07372a0d
Commit
07372a0d
authored
Mar 15, 2010
by
dt
Browse files
Fix wrong en/disabling of actions
Reviewed-By: con
parent
f30627b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/projectexplorer/projectexplorer.cpp
View file @
07372a0d
...
...
@@ -1865,8 +1865,12 @@ void ProjectExplorerPlugin::goToTaskWindow()
void
ProjectExplorerPlugin
::
updateContextMenuActions
()
{
if
(
ProjectNode
*
projectNode
=
qobject_cast
<
ProjectNode
*>
(
d
->
m_currentNode
))
{
const
bool
addFilesEnabled
=
projectNode
->
supportedActions
().
contains
(
ProjectNode
::
AddFile
);
d
->
m_addExistingFilesAction
->
setEnabled
(
false
);
d
->
m_addNewFileAction
->
setEnabled
(
false
);
d
->
m_removeFileAction
->
setEnabled
(
false
);
if
(
FolderNode
*
folderNode
=
qobject_cast
<
FolderNode
*>
(
d
->
m_currentNode
))
{
const
bool
addFilesEnabled
=
folderNode
->
projectNode
()
->
supportedActions
().
contains
(
ProjectNode
::
AddFile
);
d
->
m_addExistingFilesAction
->
setEnabled
(
addFilesEnabled
);
d
->
m_addNewFileAction
->
setEnabled
(
addFilesEnabled
);
}
else
if
(
FileNode
*
fileNode
=
qobject_cast
<
FileNode
*>
(
d
->
m_currentNode
))
{
...
...
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