project view: set 'enabled' attribute accordingly with 'visible' for toggle actions

This commit is contained in:
nik
2014-11-10 13:00:55 +03:00
parent 243ebf8923
commit a1686e663c
2 changed files with 3 additions and 3 deletions
@@ -1830,7 +1830,7 @@ public class ProjectViewImpl extends ProjectView implements PersistentStateCompo
super.update(e);
final Presentation presentation = e.getPresentation();
AbstractProjectViewPane pane = getCurrentProjectViewPane();
presentation.setVisible(pane != null && pane.supportsManualOrder());
presentation.setEnabledAndVisible(pane != null && pane.supportsManualOrder());
}
}
@@ -1876,7 +1876,7 @@ public class ProjectViewImpl extends ProjectView implements PersistentStateCompo
public void update(final AnActionEvent e) {
super.update(e);
final Presentation presentation = e.getPresentation();
presentation.setVisible(getCurrentProjectViewPane() != null);
presentation.setEnabledAndVisible(getCurrentProjectViewPane() != null);
}
}
@@ -214,7 +214,7 @@ public class ProjectViewPane extends AbstractProjectViewPSIPane {
super.update(e);
final Presentation presentation = e.getPresentation();
final ProjectView projectView = ProjectView.getInstance(myProject);
presentation.setVisible(projectView.getCurrentProjectViewPane() == ProjectViewPane.this);
presentation.setEnabledAndVisible(projectView.getCurrentProjectViewPane() == ProjectViewPane.this);
}
}
}