Changeset 3780 in josm for trunk/src/org


Ignore:
Timestamp:
2011-01-08T12:51:03+01:00 (14 years ago)
Author:
Upliner
Message:

Fix #5791 Offset window cannot be opened after closing it with "Esc" key

File:
1 edited

Legend:

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

    r3737 r3780  
    212212        @Override
    213213        protected void buttonAction(int buttonIndex, ActionEvent evt) {
    214             if (buttonIndex != 1 && tBookmarkName.getText() != null && !"".equals(tBookmarkName.getText()) &&
     214            if (buttonIndex == 0 && tBookmarkName.getText() != null && !"".equals(tBookmarkName.getText()) &&
    215215                    OffsetBookmark.getBookmarkByName(layer, tBookmarkName.getText()) != null) {
    216216                if (!confirmOverwriteBookmark()) return;
    217217            }
    218218            super.buttonAction(buttonIndex, evt);
     219        }
     220
     221        @Override
     222        public void setVisible(boolean visible) {
     223            super.setVisible(visible);
     224            if (visible) return;
    219225            offsetDialog = null;
    220             if (buttonIndex == 1) {
     226            if (getValue() != 1) {
    221227                layer.setOffset(oldDx, oldDy);
    222228            } else if (tBookmarkName.getText() != null && !"".equals(tBookmarkName.getText())) {
Note: See TracChangeset for help on using the changeset viewer.