Project

General

Profile

Revision 72614023

ID726140230bf486df1a7ea6adc330085f2d237680
Parent eee3eb03
Child 0354dac6

Added by Patrick Plitzner over 2 years ago

ref #7439 Fix visual update when converting team <> person

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/BulkEditorE4.java
64 64
import org.eclipse.swt.widgets.Composite;
65 65
import org.eclipse.swt.widgets.Menu;
66 66

  
67
import ca.odell.glazedlists.BasicEventList;
68 67
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
69 68
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
70 69
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
......
421 420
    }
422 421

  
423 422
    public void refresh() {
424
        refresh(true);
423
//        refresh(true);
425 424
    }
426 425

  
427 426
    public void refresh(boolean resetInput) {
428
        if(resetInput){
427
//        if(resetInput){
429 428
//            viewer.setInput(getEditorInput().getModel());
430
        }
431
//        viewer.refresh();
429
//        }
430
//        natTable.doCommand(new VisualRefreshCommand());
432 431
    }
433 432

  
434 433
//    public TableViewer getViewer() {
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/handler/ConvertPerson2TeamHandlerE4.java
54 54
            }
55 55
        }
56 56

  
57

  
58
        Person person = (Person) selection;
57 59
        Team team =null;
58 60
        UpdateResult result = null;
59 61
        try {
......
65 67
        }
66 68
        if (result != null &&result.isOk()){
67 69
            team = (Team)result.getCdmEntity();
68
        }
69
        if (team != null){
70
            editor.refresh();
70
            editor.getEditorInput().getModel().remove(person);
71
            editor.getEditorInput().getModel().add(team);
71 72
        }
72 73
    }
73 74

  
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/handler/ConvertTeam2PersonHandlerE4.java
65 65
		}
66 66
		if (result != null && result.isOk()){
67 67
		    person = (Person)result.getCdmEntity();
68
		    boolean test = editor.getEditorInput().getModel().remove(team);
68
		    editor.getEditorInput().getModel().remove(team);
69 69
		    editor.getEditorInput().getModel().add(person);
70 70
		}
71
		if (person != null){
72
		    editor.refresh();
73
		}
74 71
    }
75 72

  
76 73
    @CanExecute

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)