Changeset 12652 in josm for trunk/src/org/openstreetmap/josm/gui/download/OverpassQueryWizardDialog.java
- Timestamp:
- 2017-08-26T00:02:12+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/download/OverpassQueryWizardDialog.java
r12620 r12652 20 20 21 21 import org.openstreetmap.josm.Main; 22 import org.openstreetmap.josm.actions.OverpassDownloadAction.OverpassDownloadDialog;23 22 import org.openstreetmap.josm.data.preferences.CollectionProperty; 24 23 import org.openstreetmap.josm.gui.ExtendedDialog; … … 64 63 + "</style>\n"; 65 64 66 private final OverpassDownload Dialog parentDialog;65 private final OverpassDownloadSource.OverpassDownloadSourcePanel dsPanel; 67 66 68 67 /** 69 68 * Create a new {@link OverpassQueryWizardDialog} 70 * @param parentDialog The parent this dialog should be displayed for71 */ 72 public OverpassQueryWizardDialog(OverpassDownload Dialog parentDialog) {73 super( parentDialog, tr("Overpass Turbo Query Wizard"),69 * @param dsPanel The Overpass download source panel. 70 */ 71 public OverpassQueryWizardDialog(OverpassDownloadSource.OverpassDownloadSourcePanel dsPanel) { 72 super(dsPanel.getParent(), tr("Overpass Turbo Query Wizard"), 74 73 tr("Build query"), tr("Build query and execute"), tr("Cancel")); 75 this. parentDialog = parentDialog;74 this.dsPanel = dsPanel; 76 75 77 76 this.queryWizard = new HistoryComboBox(); … … 91 90 queryWizard.setPossibleItems(OVERPASS_WIZARD_HISTORY.get()); 92 91 93 setCancelButton(CANCEL );94 setDefaultButton(BUILD_AN_EXECUTE_QUERY + 1); // Build and execute button92 setCancelButton(CANCEL + 1); 93 setDefaultButton(BUILD_AN_EXECUTE_QUERY + 1); 95 94 setContent(panel, false); 96 95 } … … 110 109 super.buttonAction(BUILD_AN_EXECUTE_QUERY, evt); 111 110 112 parentDialog.triggerDownload();111 DownloadDialog.getInstance().startDownload(); 113 112 } 114 113 break; … … 143 142 Logging.error(ex); 144 143 JOptionPane.showMessageDialog( 145 parentDialog,144 dsPanel.getParent(), 146 145 "<html>" + 147 146 tr("The Overpass wizard could not parse the following query:") + … … 166 165 if (q.isPresent()) { 167 166 String query = q.get(); 168 parentDialog.setOverpassQuery(query);167 dsPanel.setOverpassQuery(query); 169 168 170 169 return true;
Note:
See TracChangeset
for help on using the changeset viewer.