Changeset 14676 in josm


Ignore:
Timestamp:
2019-01-12T16:44:47+01:00 (6 years ago)
Author:
Don-vip
Message:

fix #17182 - restore contextual menu of history dialog

Location:
trunk/src/org/openstreetmap/josm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/BoundingXYVisitor.java

    r14628 r14676  
    178178     * If the bounding box has not been set (<code>min</code> or <code>max</code>
    179179     * equal <code>null</code>) this method does not do anything.
     180     *
     181     * @since 14628
    180182     */
    181183    public void enlargeBoundingBoxLogarithmically() {
  • trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java

    r14675 r14676  
    4343public class NodeListViewer extends HistoryViewerPanel {
    4444
    45     private final NodeListPopupMenu popupMenu = new NodeListPopupMenu();
    46 
    4745    /**
    4846     * Constructs a new {@code NodeListViewer}.
     
    218216    class InternalPopupMenuLauncher extends PopupMenuLauncher {
    219217        InternalPopupMenuLauncher() {
    220             super(popupMenu);
     218            super(new NodeListPopupMenu());
    221219        }
    222220
     
    224222        protected int checkTableSelection(JTable table, Point p) {
    225223            int row = super.checkTableSelection(table, p);
    226             popupMenu.prepare(primitiveIdAtRow((DiffTableModel) table.getModel(), row));
     224            ((NodeListPopupMenu) menu).prepare(primitiveIdAtRow((DiffTableModel) table.getModel(), row));
    227225            return row;
    228226        }
  • trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java

    r14545 r14676  
    1414import java.awt.event.KeyEvent;
    1515import java.awt.event.MouseEvent;
     16import java.util.Objects;
    1617
    1718import javax.swing.DefaultCellEditor;
     
    124125    final class MouseListener extends PopupMenuLauncher {
    125126        private MouseListener() {
    126             super(popupMenu);
     127            super(Objects.requireNonNull(popupMenu));
    127128        }
    128129
  • trunk/src/org/openstreetmap/josm/gui/widgets/PopupMenuLauncher.java

    r14248 r14676  
    1515import javax.swing.SwingUtilities;
    1616import javax.swing.tree.TreePath;
     17
     18import org.openstreetmap.josm.tools.Logging;
    1719
    1820/**
     
    113115                menu.show(component, evt.getX(), evt.getY());
    114116            }
     117        } else {
     118            Logging.warn("Unable to display menu {0} - {1}", menu, evt);
    115119        }
    116120    }
Note: See TracChangeset for help on using the changeset viewer.