Adding colormap scale is not dependent on type of source

This commit is contained in:
2019-03-06 08:27:58 +01:00
parent 4d2e74b851
commit 3084fe0510

View File

@@ -170,13 +170,20 @@ public class ScreenPanel4 extends Panel {
public double colormapMax; public double colormapMax;
public Colormap colormap; public Colormap colormap;
public boolean colormapLogarithmic; public boolean colormapLogarithmic;
String getFile() {
if (camera == null) {
return null;
}
return getContext().getSetup().expandPath("{context}/screen_panel/" + cameraName + ".properties");
}
} }
void loadCameraState() { void loadCameraState() {
if (persistCameraState) { if (persistCameraState) {
try { try {
CameraState state = new CameraState(); CameraState state = new CameraState();
state.load(getCameraConfigFile()); state.load(state.getFile());
if (state.valid) { if (state.valid) {
buttonSidePanel.setSelected(state.showSidePanel); buttonSidePanel.setSelected(state.showSidePanel);
buttonSidePanelActionPerformed(null); buttonSidePanelActionPerformed(null);
@@ -229,7 +236,7 @@ public class ScreenPanel4 extends Panel {
state.showScale = buttonScale.isSelected(); state.showScale = buttonScale.isSelected();
state.showTitle = buttonTitle.isSelected(); state.showTitle = buttonTitle.isSelected();
state.save(getCameraConfigFile()); state.save(state.getFile());
} catch (Exception ex) { } catch (Exception ex) {
ex.printStackTrace(); ex.printStackTrace();
} }
@@ -742,13 +749,6 @@ public class ScreenPanel4 extends Panel {
super.onStop(); super.onStop();
} }
String getCameraConfigFile() {
if (camera == null) {
return null;
}
return getContext().getSetup().expandPath("{context}/screen_panel/" + camera.getName() + ".properties");
}
//Overridable callbacks //Overridable callbacks
@Override @Override
public void onInitialize(int runCount) { public void onInitialize(int runCount) {