Skip to content

Commit

Permalink
Merge pull request #703 from Mailaender/dirty-focus
Browse files Browse the repository at this point in the history
Fixed editor being marked as dirty when there are no changes
  • Loading branch information
eselmeister authored Aug 13, 2021
2 parents 2b34d9d + fb7ed77 commit 9d8bafb
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ private void importMassSpectra(File file, boolean batch) throws FileNotFoundExce
/*
* Add the mass spectra handling.
*/
dirtyable.setDirty(true);
massSpectra = runnable.getMassSpectra();
massSpectrumFile = file;
massSpectra.addUpdateListener(new IUpdateListener() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ private void importMassSpectrum(File file, boolean batch) throws FileNotFoundExc
} catch(InterruptedException e) {
logger.warn(e);
}
dirtyable.setDirty(true);
massSpectra = runnable.getMassSpectra();
massSpectrumFile = file;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2017, 2020 Lablicate GmbH.
* Copyright (c) 2017, 2021 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -36,6 +36,7 @@
import org.eclipse.e4.ui.workbench.modeling.EModelService;
import org.eclipse.e4.ui.workbench.modeling.EPartService;
import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState;
import org.eclipse.swt.widgets.Shell;

public interface ISupplierFileEditorSupport extends ISupplierFileIdentifier {

Expand Down Expand Up @@ -126,5 +127,6 @@ default void openEditor(File file, Object object, String elementId, String contr
*/
partStack.getChildren().add(part);
partService.showPart(part, PartState.ACTIVATE);
((Shell)window.getWidget()).forceFocus();
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018, 2020 Lablicate GmbH.
* Copyright (c) 2018, 2021 Lablicate GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand Down Expand Up @@ -259,7 +259,6 @@ private synchronized void initialize(Composite parent) {
//
if(chromatogramSelection != null) {
part.setLabel(ChromatogramDataSupport.getChromatogramEditorLabel(chromatogramSelection));
dirtyable.setDirty(true);
chromatogramSelection.update(true);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ public IQuantitationDatabase getQuantitationDatabase() {
private void initialize(Composite parent) {

createEditorPages(parent);
dirtyable.setDirty(true);
quantitationDatabase = loadQuantitationDatabase();
extendedQuantCompoundListUI.update(quantitationDatabase);
}
Expand Down

0 comments on commit 9d8bafb

Please sign in to comment.