Changeset 13126 in josm
- Timestamp:
- 2017-11-18T23:51:23+01:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapView.java
r12881 r13126 41 41 import org.openstreetmap.josm.actions.mapmode.MapMode; 42 42 import org.openstreetmap.josm.data.Bounds; 43 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent;44 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;45 43 import org.openstreetmap.josm.data.ProjectionBounds; 46 44 import org.openstreetmap.josm.data.ViewportData; … … 77 75 import org.openstreetmap.josm.io.audio.AudioPlayer; 78 76 import org.openstreetmap.josm.spi.preferences.Config; 77 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 78 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 79 79 import org.openstreetmap.josm.tools.JosmRuntimeException; 80 80 import org.openstreetmap.josm.tools.Logging; … … 928 928 initialViewport = viewportData; 929 929 } 930 931 /** 932 * Returns the internal {@link MapMover}. 933 * @return the internal {@code MapMover} 934 * @since 13126 935 */ 936 public final MapMover getMapMover() { 937 return mapMover; 938 } 930 939 } -
trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java
r13122 r13126 11 11 import java.awt.event.MouseEvent; 12 12 import java.awt.event.MouseListener; 13 import java.awt.event.MouseWheelEvent; 14 import java.awt.event.MouseWheelListener; 13 15 import java.io.File; 14 16 import java.text.DateFormat; … … 173 175 if (displayedWindow != null) { 174 176 displayedWindow.setVisible(false); 177 for (MouseWheelListener listener : displayedWindow.getMouseWheelListeners()) { 178 displayedWindow.removeMouseWheelListener(listener); 179 } 175 180 displayedWindow.dispose(); 176 181 displayedWindow = null; … … 207 212 displayedWindow.setAutoRequestFocus(false); 208 213 displayedWindow.add(displayedPanel); 214 // Forward mouse wheel scroll event to MapMover 215 displayedWindow.addMouseWheelListener(e -> mv.getMapMover().mouseWheelMoved( 216 (MouseWheelEvent) SwingUtilities.convertMouseEvent(displayedWindow, e, mv))); 209 217 } else { 210 218 displayedPanel.setText(text);
Note:
See TracChangeset
for help on using the changeset viewer.