diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/E4LifeCycle.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/E4LifeCycle.java index 812260c..be6d932 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/E4LifeCycle.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/E4LifeCycle.java @@ -61,6 +61,8 @@ public class E4LifeCycle { final Options opt = new Options(args, 0, Integer.MAX_VALUE); opt.getSet() .addOption("clearPersistedState", Multiplicity.ZERO_OR_ONE) + .addOption("launcher.defaultAction", Separator.BLANK, Multiplicity.ZERO_OR_ONE) + .addOption("launcher.openFile", Multiplicity.ZERO_OR_ONE) .addOption("c", Separator.BLANK, Multiplicity.ZERO_OR_ONE); if (!opt.check(Options.DEFAULT_SET, true, false)) { logger.error(opt.getCheckErrors()); diff --git a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java index e629583..54e71b3 100644 --- a/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java +++ b/plugins/com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java @@ -577,7 +577,9 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis } else sync.asyncExec(()->{ waveformPane.setMaxTime(database.getMaxTime()); - if (state != null) + if(partConfig!=null && !partConfig.isEmpty()) + loadState(partConfig); + if (state != null && !state.isEmpty()) restoreWaveformViewerState(state); fileChecker = null; if (checkForUpdates) @@ -630,13 +632,9 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis if (file.exists()) filesToLoad.add(file); } - if(partConfig!=null) { - this.partConfig=partConfig; - } + this.partConfig=partConfig; if (!filesToLoad.isEmpty()) loadDatabase(persistedState); - if(partConfig!=null && !partConfig.isEmpty()) - loadState(partConfig); } /**