Changeset 18147 in osm for applications
- Timestamp:
- 2009-10-14T21:36:51+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbDownloadLoop.java
r13497 r18147 78 78 79 79 // auto download if configured 80 if( Main.pref.getBoolean(ConfigKeys.OSB_AUTO_DOWNLOAD) && OsbPlugin.active ) { 80 if( Main.pref.getBoolean(ConfigKeys.OSB_AUTO_DOWNLOAD) && 81 plugin != null && plugin.getDialog() != null && plugin.getDialog().isDialogShowing() ) { 81 82 if(countdown < 0) { 82 83 if(!downloadDone) { -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbPlugin.java
r17713 r18147 31 31 32 32 import java.net.URL; 33 import java.util.LinkedList;34 33 35 34 import javax.swing.ImageIcon; … … 65 64 private OsbLayer layer; 66 65 67 public static boolean active = false;68 69 66 private DownloadAction download = new DownloadAction(); 70 67 … … 164 161 165 162 // display the parsed data 166 if(!dataSet.nodes.isEmpty() ) {163 if(!dataSet.nodes.isEmpty() && dialog.isDialogShowing()) { 167 164 // if the map layer has been closed, while we are requesting the osb db, 168 165 // we don't have to update the gui, because the user is not interested … … 218 215 public void layerAdded(Layer newLayer) { 219 216 if(newLayer instanceof OsmDataLayer) { 220 active = dialog.isDialogShowing();221 222 217 // start the auto download loop 223 218 OsbDownloadLoop.getInstance().setPlugin(this); … … 246 241 this.dataSet = dataSet; 247 242 } 243 244 public OsbDialog getDialog() { 245 return dialog; 246 } 248 247 }
Note:
See TracChangeset
for help on using the changeset viewer.