Changeset 12839 in josm


Ignore:
Timestamp:
2017-09-13T12:28:29+02:00 (2 months ago)
Author:
bastiK
Message:

fixed #15198 - JOSM freezes after showing popup for unsuccesfull search

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java

    r12666 r12839  
    66import static org.openstreetmap.josm.tools.I18n.trn;
    77
     8import java.awt.Component;
    89import java.awt.Cursor;
    910import java.awt.Dimension;
     
    669670         * @param setting The setting used.
    670671         */
    671         void receiveSearchResult(DataSet ds, Collection<OsmPrimitive> result, int foundMatches, SearchSetting setting);
     672        void receiveSearchResult(DataSet ds, Collection<OsmPrimitive> result, int foundMatches, SearchSetting setting, Component parent);
    672673    }
    673674
     
    678679
    679680        @Override
    680         public void receiveSearchResult(DataSet ds, Collection<OsmPrimitive> result, int foundMatches, SearchSetting setting) {
     681        public void receiveSearchResult(DataSet ds, Collection<OsmPrimitive> result, int foundMatches, SearchSetting setting, Component parent) {
    681682            ds.setSelected(result);
    682683            MapFrame map = MainApplication.getMap();
     
    700701                if (!GraphicsEnvironment.isHeadless()) {
    701702                    JOptionPane.showMessageDialog(
    702                             Main.parent,
     703                            parent,
    703704                            msg,
    704705                            tr("Warning"),
     
    721722        @Override
    722723        public void receiveSearchResult(DataSet ds, Collection<OsmPrimitive> result, int foundMatches,
    723                 SearchSetting setting) {
     724                SearchSetting setting, Component parent) {
    724725                    this.result = result;
    725726        }
     
    826827                return;
    827828            }
    828             resultReceiver.receiveSearchResult(ds, selection, foundMatches, setting);
     829            resultReceiver.receiveSearchResult(ds, selection, foundMatches, setting, getProgressMonitor().getWindowParent());
    829830        }
    830831    }
Note: See TracChangeset for help on using the changeset viewer.