Project

General

Profile

« Previous | Next » 

Revision 01b18a63

Added by Patrick Plitzner about 4 years ago

ref #7086 set WS editor dirty when selecting feature tree

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/workingSet/WorkingSetEditor.java
145 145
            }
146 146
        });
147 147

  
148
        composite.getFeatureTreeEditorComposite().init(null, null, e->selectionService.setSelection(e.getSelection()), null, null);
148
        composite.getFeatureTreeEditorComposite().init(null, null, e->selectionService.setSelection(e.getSelection()), this, null);
149 149

  
150 150
        //add drag'n'drop support
151 151
        Transfer[] transfers = new Transfer[] {LocalSelectionTransfer.getTransfer()};
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureTreeEditorComposite.java
34 34
import eu.etaxonomy.taxeditor.featuretree.FeatureTreeContentProvider;
35 35
import eu.etaxonomy.taxeditor.featuretree.FeatureTreeLabelProvider;
36 36
import eu.etaxonomy.taxeditor.l10n.Messages;
37
import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
37 38
import eu.etaxonomy.taxeditor.model.ImageResources;
38 39
import eu.etaxonomy.taxeditor.ui.dialog.selection.FeatureTreeSelectionDialog;
39 40

  
......
82 83
                new GridData(SWT.FILL, SWT.FILL, true, true));
83 84
    }
84 85

  
86
    public void init(DragSourceListener dragSourceListener, DropTargetListener dropTargetListener,
87
            ISelectionChangedListener viewerSelectionChangedListener, IDirtyMarkable dirtyMarkable,
88
            ModifyListener textModifyListener) {
89
        this.init(dragSourceListener, dropTargetListener, viewerSelectionChangedListener, null, dirtyMarkable,
90
                textModifyListener);
91
    }
85 92
    public void init(DragSourceListener dragSourceListener, DropTargetListener dropTargetListener,
86 93
            ISelectionChangedListener viewerSelectionChangedListener,
87 94
            SelectionListener openFeatureTreeSelectionListener,
88 95
            ModifyListener textModifyListener) {
96
        init(dragSourceListener, dropTargetListener, viewerSelectionChangedListener, openFeatureTreeSelectionListener,
97
                null, textModifyListener);
98
    }
99
    private void init(DragSourceListener dragSourceListener, DropTargetListener dropTargetListener,
100
            ISelectionChangedListener viewerSelectionChangedListener,
101
            SelectionListener openFeatureTreeSelectionListener, IDirtyMarkable dirtyMarkable,
102
            ModifyListener textModifyListener) {
89 103
        viewer.setContentProvider(new FeatureTreeContentProvider());
90 104
        viewer.setLabelProvider(new FeatureTreeLabelProvider());
91 105

  
......
121 135
                    if(tree!=null){
122 136
                        setSelectedTree(tree);
123 137
                        text_title.setEnabled(false);
138
                        if(dirtyMarkable!=null){
139
                            dirtyMarkable.forceDirty();
140
                        }
124 141
                    }
125 142
                }
126 143
            });

Also available in: Unified diff