Project

General

Profile

Revision 3f0054fb

ID3f0054fba8ecbea7156bb4d5b18798328ed04114
Parent 3687f7bc
Child b6b0c782

Added by Patrick Plitzner almost 3 years ago

ref #6595 Fix selection propagation for name editor when entering text

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/TaxonNameEditorE4.java
175 175
			public boolean setInput(Object input) {
176 176
				if (input instanceof AbstractGroupedContainerE4) {
177 177
				    TaxonBase newSelection = ((AbstractGroupedContainerE4) input).getData();
178
				    if(selection!=newSelection){
178
				    if(selection!=newSelection || TaxonNameEditorE4.this.isDirty()){
179 179
				        selection = newSelection;
180 180
				        selService.setSelection(new StructuredSelection(selection));
181 181
				    }
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/container/AbstractGroupedContainerE4.java
554 554
		}
555 555
	}
556 556

  
557
	private boolean isExecuting = false;
558

  
557 559
	protected void setDelayedSelection() {
558 560
		// TODO this might be done better
559 561
		// this is the quickest solution i could come up with and it improves
......
568 570
			@Override
569 571
            public void run() {
570 572
				getEditor().getManagedForm().setInput(selection);
573
				isExecuting = false;
571 574
			}
572 575
		};
573
		display.timerExec(1000, runnable);
576
		if(!isExecuting){
577
		    isExecuting = true;
578
		    display.timerExec(1000, runnable);
579
		}
574 580

  
575 581
	}
576 582

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)