Ignore:
Timestamp:
2011-02-28T20:07:25+01:00 (13 years ago)
Author:
hampelratte
Message:

Ticket #6036

Disable the bug list and the issue releated buttons during the update process, so that the user can't work with inconsistent data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbPlugin.java

    r23747 r25473  
    3030import static org.openstreetmap.josm.tools.I18n.tr;
    3131
    32 
    3332import javax.swing.ImageIcon;
    3433import javax.swing.JOptionPane;
     34import javax.swing.SwingUtilities;
    3535
    3636import org.openstreetmap.josm.Main;
     
    161161
    162162    public void updateData() {
     163        // disable the dialog
     164        try {
     165            SwingUtilities.invokeAndWait(new Runnable() {
     166                public void run() {
     167                    dialog.setEnabled(false);
     168                }
     169            });
     170        } catch (Exception e) {
     171            e.printStackTrace();
     172        }
     173       
    163174        // store the current selected node
    164175        Node selectedNode = getDialog().getSelectedNode();
     
    173184            return;
    174185        }
     186       
    175187
    176188        // download data for the new bounds, if the plugin is not in offline mode
     
    201213        }
    202214
     215       
    203216        // restore node selection
    204217        dialog.setSelectedNode(selectedNode);
     218       
     219        // enable the dialog
     220        try {
     221            SwingUtilities.invokeAndWait(new Runnable() {
     222                public void run() {
     223                    dialog.setEnabled(true);
     224                }
     225            });
     226        } catch (Exception e) {
     227            e.printStackTrace();
     228        }
    205229    }
    206230
Note: See TracChangeset for help on using the changeset viewer.