Ignore:
Timestamp:
2017-03-03T01:40:29+01:00 (3 years ago)
Author:
Don-vip
Message:

FindBugs - ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD

File:
1 edited

Legend:

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

    r11186 r11652  
    7070        old = layer.getDisplaySettings().getDisplacement();
    7171        addListeners();
    72         offsetDialog = new ImageryOffsetDialog();
     72        showOffsetDialog(new ImageryOffsetDialog());
     73    }
     74
     75    private static void showOffsetDialog(ImageryOffsetDialog dlg) {
     76        offsetDialog = dlg;
    7377        offsetDialog.setVisible(true);
     78    }
     79
     80    private static void hideOffsetDialog() {
     81        offsetDialog.setVisible(false);
     82        offsetDialog = null;
    7483    }
    7584
     
    91100                layer.getDisplaySettings().setDisplacement(old);
    92101            }
    93             offsetDialog.setVisible(false);
     102            hideOffsetDialog();
    94103            // do not restore old mode here - this is called when the new mode is already known.
    95             offsetDialog = null;
    96104        }
    97105        removeListeners();
Note: See TracChangeset for help on using the changeset viewer.