fix CLI handling
This commit is contained in:
parent
c5d77af0d0
commit
3daea8ab43
@ -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());
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user