Commit 71a02244 authored by Andrey Filippov's avatar Andrey Filippov

Updating history path on load

parent 7b0865f3
......@@ -9220,10 +9220,13 @@ if (MORE_BUTTONS) {
!interactive, // false, // true, // boolean smart, // do not open dialog if default matches
FOCUS_MEASUREMENT_PARAMETERS.focusingHistoryFile, // FOCUSING_FIELD_HISTORY_PATH, //"",//); //String defaultPath); // AtomicInteger stopRequested
this.SYNC_COMMAND.stopRequested);
String path=FOCUSING_FIELD.getHistoryPath();
if (path==null) return false; // did not load
FOCUS_MEASUREMENT_PARAMETERS.focusingHistoryFile=path;
FOCUSING_FIELD.setDebugLevel(DEBUG_LEVEL);
FOCUSING_FIELD.setAdjustMode(false);
if (PROPERTIES!=null) FOCUSING_FIELD.getProperties("FOCUSING_FIELD.", PROPERTIES,true); // keep distortions center from history
System.out.println("Loaded FocusingField");
System.out.println("Loaded FocusingField from "+path);
if (!FOCUSING_FIELD.configureDataVector(
true, // boolean silent (maybe add option with false to change number of parameters?)
"Configure curvature - TODO: fix many settings restored from properties", // String title
......@@ -9240,8 +9243,6 @@ if (MORE_BUTTONS) {
double rms= FOCUSING_FIELD.calcErrorDiffY(focusing_fx, false);
double rms_pure= FOCUSING_FIELD.calcErrorDiffY(focusing_fx, true);
System.out.println("rms="+rms+", rms_pure="+rms_pure);
return true; // add OK/fail
}
......
......@@ -202,6 +202,7 @@ public class FocusingField {
public String serialNumber;
public String lensSerial; // if null - do not add average
public String comment;
public String historyPath=null;
public int sensorWidth;
public int sensorHeight;
// public static final double PIXEL_SIZE=0.0022; // mm
......@@ -4781,6 +4782,7 @@ public boolean LevenbergMarquardt(
if (debugLevel>0){
System.out.println("Loaded measurement history "+pathname);
}
this.historyPath=pathname;
return true;
}
public void saveXML(
......@@ -4831,6 +4833,10 @@ public boolean LevenbergMarquardt(
// TODO Auto-generated catch block
e.printStackTrace();
}
this.historyPath=path;
}
public String getHistoryPath(){
return this.historyPath;
}
public void testMeasurement(){
GenericDialog gd = new GenericDialog("Select measurement");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment