Skip to content

Commit

Permalink
fixes #11
Browse files Browse the repository at this point in the history
  • Loading branch information
r00tat committed Oct 10, 2014
1 parent dd83ce2 commit a21f447
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,9 @@ public int getColorThreshold() {
// refresh from prefs
try{
this.colorThreshold=Integer.parseInt(Main.pref.get(PREF_COLORTHRESHOLD, Integer.toString(ImageAnalyzer.DEFAULT_COLORTHRESHOLD)));
}catch(Throwable th){}
}catch(Throwable th){
log.warn("Could not load color threshold",th);
}
return colorThreshold;
}

Expand All @@ -325,8 +327,10 @@ public void setColorThreshold(int colorThreshold) {
*/
public double getToleranceDist() {
try{
this.toleranceDist=Integer.parseInt(Main.pref.get(PREF_TOLERANCEDIST, Double.toString(ImageAnalyzer.DEFAULT_TOLERANCEDIST)));
}catch(Throwable th){}
this.toleranceDist=Double.parseDouble(Main.pref.get(PREF_TOLERANCEDIST, Double.toString(ImageAnalyzer.DEFAULT_TOLERANCEDIST)));
}catch(Throwable th){
log.warn("Could not load tolerance dist",th);
}
return toleranceDist;
}

Expand All @@ -343,8 +347,10 @@ public void setToleranceDist(double toleranceDist) {
*/
public double getToleranceAngle() {
try{
this.toleranceAngle=Integer.parseInt(Main.pref.get(PREF_TOLERANCEANGLE, Double.toString(ImageAnalyzer.DEFAULT_TOLERANCEANGLE)));
}catch(Throwable th){}
this.toleranceAngle=Double.parseDouble(Main.pref.get(PREF_TOLERANCEANGLE, Double.toString(ImageAnalyzer.DEFAULT_TOLERANCEANGLE)));
}catch(Throwable th){
log.warn("Could not load tolerance angle",th);
}
return toleranceAngle;
}

Expand Down

0 comments on commit a21f447

Please sign in to comment.