Update default settings map creator

This commit is contained in:
Victor Shcherb 2012-06-23 13:24:45 +02:00
parent 3a345c5bbd
commit ffb68a1cee
2 changed files with 19 additions and 15 deletions

View file

@ -132,7 +132,7 @@ public class NativeSwingRendering extends NativeLibrary {
public static NativeSwingRendering getDefaultFromSettings() {
String filename = DataExtractionSettings.getSettings().getNativeLibFile();
if(!(new File(filename).exists())) {
if(filename.length() == 0 || !(new File(filename).exists())) {
return null;
}
NativeSwingRendering lib = NativeSwingRendering.loadLibrary(filename);

View file

@ -240,8 +240,9 @@ public class OsmExtractionUI implements IMapLocationListener {
}
private void initNativeRendering() {
NativeSwingRendering lib = NativeSwingRendering.loadLibrary(
DataExtractionSettings.getSettings().getNativeLibFile());
String fl = DataExtractionSettings.getSettings().getNativeLibFile();
if (fl != null) {
NativeSwingRendering lib = NativeSwingRendering.loadLibrary(fl);
if (lib != null) {
try {
lib.initFilesInDir(new File(DataExtractionSettings.getSettings().getBinaryFilesDir()));
@ -256,6 +257,9 @@ public class OsmExtractionUI implements IMapLocationListener {
throw new RuntimeException(e);
}
}
} else {
JOptionPane.showMessageDialog(frame, "Native library was not configured in settings");
}
}
public void fillMenuWithActions(final JMenuBar bar){