Project

General

Profile

« Previous | Next » 

Revision e65bc0e2

Added by Katja Luther over 1 year ago

ref #10182: update details view when it gets the focus and there are changes

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/details/DetailsViewerE4.java
162 162
    private ISelection selection;
163 163
    private boolean detailsEnabled = true;
164 164
    private Object activePart;
165
    
166
    private boolean needsRefresh = false;
165 167

  
166 168
    public boolean isDetailsEnabled() {
167 169
		return detailsEnabled;
......
176 178
        setInput(input);
177 179

  
178 180
    }
181
	
182
	public boolean isNeedsRefresh() {
183
		return needsRefresh;
184
	}
185

  
186
	public void setNeedsRefresh(boolean needsRefresh) {
187
		this.needsRefresh = needsRefresh;
188
	}
179 189
    // START HACK TO MAKE THE DERIVED UNIT FACADE WORK
180 190
    // since we are getting implementations of DerivedUnitBase from the bulk
181 191
    // editor and not derived unit facade objects,
......
987 997
    private void updateView(@UIEventTopic(WorkbenchEventConstants.REFRESH_DETAILS)boolean refresh){
988 998
        if(refresh){
989 999
        	//refresh_withoutnew_build(); this would use the update without creation of all fields
990
        	refresh();
1000
        	if (needsRefresh) {
1001
        		refresh();
1002
        	}
1003
        	this.needsRefresh = false;
991 1004
        }
992 1005
    }
993 1006
    
994 1007
    @Inject
995 1008
    @Optional
996
    private void blockView(@UIEventTopic(WorkbenchEventConstants.ENABLE_TAXON_DETAILS)boolean enable){
1009
    private void needsRefresh(@UIEventTopic(WorkbenchEventConstants.NEED_REFRESH_DETAILS)boolean enable){
997 1010
       for (IFormPart part :this.managedForm.getParts()) {
998 1011
    	   if (part instanceof CdmSectionPart) {
999
    		   ((CdmSectionPart)part).getSection().setEnabled(enable);
1012
    		   //((CdmSectionPart)part).getSection().setEnabled(enable);
1013
    		   this.setNeedsRefresh(!enable);
1014
    		   
1000 1015
    	   }
1001 1016
       }
1002 1017
    	
......
1020 1035
           }
1021 1036
        }
1022 1037
    }
1038

  
1039
	
1023 1040
}

Also available in: Unified diff