mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 14:15:23 +02:00
Fix folding toggle action state updates
This commit is contained in:
parent
c82eb0d880
commit
e99ef14b18
1 changed files with 1 additions and 4 deletions
|
@ -90,11 +90,9 @@ public class FoldingActionGroup extends ActionGroup {
|
|||
fViewer= (ProjectionViewer) viewer;
|
||||
|
||||
fProjectionListener= new IProjectionListener() {
|
||||
|
||||
public void projectionEnabled() {
|
||||
update();
|
||||
}
|
||||
|
||||
public void projectionDisabled() {
|
||||
update();
|
||||
}
|
||||
|
@ -103,7 +101,6 @@ public class FoldingActionGroup extends ActionGroup {
|
|||
fViewer.addProjectionListener(fProjectionListener);
|
||||
|
||||
fToggle= new TextOperationAction(FoldingMessages.getResourceBundle(), "Projection.Toggle.", editor, ProjectionViewer.TOGGLE, true); //$NON-NLS-1$
|
||||
fToggle.setChecked(true);
|
||||
fToggle.setActionDefinitionId(IFoldingCommandIds.FOLDING_TOGGLE);
|
||||
editor.setAction("FoldingToggle", fToggle); //$NON-NLS-1$
|
||||
|
||||
|
@ -164,7 +161,7 @@ public class FoldingActionGroup extends ActionGroup {
|
|||
protected void update() {
|
||||
if (isEnabled()) {
|
||||
fToggle.update();
|
||||
fToggle.setChecked(fViewer.getProjectionAnnotationModel() != null);
|
||||
fToggle.setChecked(fViewer.isProjectionMode());
|
||||
fExpand.update();
|
||||
fExpandAll.update();
|
||||
fCollapse.update();
|
||||
|
|
Loading…
Add table
Reference in a new issue