Project

General

Profile

Revision e1fa7fbe

IDe1fa7fbe2c592da0b7297508d1e1a192437b9d6d
Parent c54a89ad
Child 5dba28d3

Added by Patrick Plitzner over 3 years ago

fix #6669 Refresh context menu before it is drawn

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/ReferencingObjectsView.java
147 147
        getSite().registerContextMenu(menuManager, viewer);
148 148
        Control control = viewer.getControl();
149 149
        Menu menu = menuManager.createContextMenu(control);
150
        menuManager.setRemoveAllWhenShown(true);
150 151
        control.setMenu(menu);
151 152

  
152 153
        // Propagate selection from viewer
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/concept/ConceptViewPart.java
47 47
 * @created Jan 24, 2011
48 48
 * @version 1.0
49 49
 */
50
public class ConceptViewPart extends AbstractCdmEditorViewPart 
50
public class ConceptViewPart extends AbstractCdmEditorViewPart
51 51
implements IPartContentHasDetails, IPartContentHasSupplementalData{
52 52

  
53 53
	public static final String ID = "eu.etaxonomy.taxeditor.editor.view.concept"; //$NON-NLS-1$
......
63 63
			showEmptyPage();
64 64
			return;
65 65
		}
66
		
66

  
67 67
        if (part instanceof DetailsViewPart || part instanceof SupplementalDataViewPart) {
68 68
            // do not show empty page as these views are also used to edit the
69 69
            // description selected in this view
......
93 93
		}
94 94

  
95 95
	}
96
	
96

  
97 97
	@Override
98 98
	protected String createPartTitle(Object selectedObject) {
99 99
		if(selectedObject instanceof TaxonEditorInput){
......
135 135

  
136 136
		Control control = viewer.getControl();
137 137
		Menu menu = menuManager.createContextMenu(control);
138
		menuManager.setRemoveAllWhenShown(true);
138 139

  
139 140
		control.setMenu(menu);
140 141
	}
......
149 150

  
150 151
		public ConceptRelationViewer(Composite parent) {
151 152
			super(parent);
152
		} 
153
		
153
		}
154

  
154 155
		@Override
155 156
		public ISelection getSelection() {
156 157
			ISelection selection = super.getSelection();
......
158 159
				Object firstElement = ((IStructuredSelection) selection).getFirstElement();
159 160
				TaxonRelationship taxonRelationship = ((Entry<TaxonRelationship, Taxon>)firstElement).getKey();
160 161
				return new StructuredSelection(taxonRelationship);
161
				
162

  
162 163
			}
163 164
			return selection;
164 165
		}
165
		
166

  
166 167
		@Override
167 168
		public void setSelection(ISelection selection) {
168 169
			super.setSelection(selection);
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/MediaViewPart.java
71 71

  
72 72
		Control control = viewer.getControl();
73 73
		Menu menu = menuMgr.createContextMenu(control);
74
		menuMgr.setRemoveAllWhenShown(true);
74 75
		control.setMenu(menu);
75 76

  
76 77
	}
......
136 137
	        ((BulkEditor) part).forceDirty();
137 138
	        IStructuredSelection selection = (IStructuredSelection) ((BulkEditor) part).getSelectionProvider().getSelection();
138 139
            ((BulkEditor) part).changed(selection.getFirstElement());
139
            
140

  
140 141
	    }
141 142
	    super.changed(object);
142 143
	}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/editor/definedterm/DefinedTermEditor.java
138 138

  
139 139
		Control control = viewer.getControl();
140 140
		Menu menu = menuManager.createContextMenu(control);
141
		menuManager.setRemoveAllWhenShown(true);
141 142
		control.setMenu(menu);
142 143
	}
143 144

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)