Ignore:
Timestamp:
2008-08-11T20:59:42+02:00 (16 years ago)
Author:
framm
Message:
  • mappaint modifications by Joerg Henne <j.henne@…>; now supports new config options mappaint.node.selected-size and .unselected-size, .fill-selected and .fill-unselected, mappaint.segment.default-width; change in unselect_all (supports escape), new keyboard shortcuts for zoom in/out (keys + and -)
Location:
trunk/src/org/openstreetmap/josm/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MainMenu.java

    r627 r768  
    1515
    1616import org.openstreetmap.josm.Main;
    17 import org.openstreetmap.josm.actions.AlignInRectangleAction;
    18 import org.openstreetmap.josm.actions.JosmAction;
    1917import org.openstreetmap.josm.actions.AboutAction;
    2018import org.openstreetmap.josm.actions.AlignInCircleAction;
    2119import org.openstreetmap.josm.actions.AlignInLineAction;
     20import org.openstreetmap.josm.actions.AlignInRectangleAction;
    2221import org.openstreetmap.josm.actions.AutoScaleAction;
    2322import org.openstreetmap.josm.actions.CombineWayAction;
    2423import org.openstreetmap.josm.actions.CopyAction;
     24import org.openstreetmap.josm.actions.DeleteAction;
    2525import org.openstreetmap.josm.actions.DownloadAction;
    2626import org.openstreetmap.josm.actions.DuplicateAction;
     
    2929import org.openstreetmap.josm.actions.HelpAction;
    3030import org.openstreetmap.josm.actions.JoinNodeWayAction;
     31import org.openstreetmap.josm.actions.JosmAction;
    3132import org.openstreetmap.josm.actions.MergeNodesAction;
    3233import org.openstreetmap.josm.actions.NewAction;
     
    4445import org.openstreetmap.josm.actions.UnselectAllAction;
    4546import org.openstreetmap.josm.actions.UploadAction;
     47import org.openstreetmap.josm.actions.ZoomInAction;
     48import org.openstreetmap.josm.actions.ZoomOutAction;
    4649import org.openstreetmap.josm.actions.audio.AudioBackAction;
     50import org.openstreetmap.josm.actions.audio.AudioFasterAction;
    4751import org.openstreetmap.josm.actions.audio.AudioFwdAction;
    4852import org.openstreetmap.josm.actions.audio.AudioNextAction;
    4953import org.openstreetmap.josm.actions.audio.AudioPlayPauseAction;
    5054import org.openstreetmap.josm.actions.audio.AudioPrevAction;
    51 import org.openstreetmap.josm.actions.audio.AudioFasterAction;
    5255import org.openstreetmap.josm.actions.audio.AudioSlowerAction;
    5356import org.openstreetmap.josm.actions.search.SearchAction;
     
    7982        public final JosmAction copy = new CopyAction();
    8083        public final JosmAction paste = new PasteAction();
     84        public final JosmAction delete = new DeleteAction();
    8185        public final JosmAction pasteTags = new PasteTagsAction(copy);
    8286        public final JosmAction duplicate = new DuplicateAction();
     
    154158                current = editMenu.add(copy);
    155159                current.setAccelerator(copy.shortCut);
     160                current = editMenu.add(delete);
     161                current.setAccelerator(delete.shortCut);
    156162                current = editMenu.add(paste);
    157163                current.setAccelerator(paste.shortCut);
     
    180186        }
    181187        viewMenu.addSeparator();
    182 
    183         // TODO move code to an "action" like the others?
     188        JosmAction a = new ZoomOutAction();
     189                viewMenu.add(a).setAccelerator(a.shortCut);
     190                a = new ZoomInAction();
     191                viewMenu.add(a).setAccelerator(a.shortCut);
     192
     193                viewMenu.addSeparator();
     194
     195                // TODO move code to an "action" like the others?
    184196        final JCheckBoxMenuItem wireframe = new JCheckBoxMenuItem(tr("Wireframe view"));
    185197        wireframe.setSelected(Main.pref.getBoolean("draw.wireframe", true));     
  • trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java

    r655 r768  
    110110         */
    111111        public Point getPoint(EastNorth p) {
     112                if(null == p)
     113                        return new Point();
    112114                double x = (p.east()-center.east())/scale + getWidth()/2;
    113115                double y = (center.north()-p.north())/scale + getHeight()/2;
  • trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java

    r743 r768  
    187187                                        }
    188188                                });
    189                                 fc.showOpenDialog(Main.parent);
    190                                 File sel = fc.getSelectedFile();
    191                                 if (!fc.getCurrentDirectory().getAbsolutePath().equals(dir))
    192                                         Main.pref.put("markers.lastaudiodirectory", fc.getCurrentDirectory().getAbsolutePath());
    193                                 if (sel == null)
    194                                         return;
    195                                 importAudio(sel);
    196                                 Main.map.repaint();
     189                                fc.setMultiSelectionEnabled(true);
     190                                if(fc.showOpenDialog(Main.parent) == JFileChooser.APPROVE_OPTION) {
     191                                        if (!fc.getCurrentDirectory().getAbsolutePath().equals(dir))
     192                                                Main.pref.put("markers.lastaudiodirectory", fc
     193                                                                .getCurrentDirectory().getAbsolutePath());
     194                                       
     195                                        // FIXME: properly support multi-selection here.
     196                                        // Calling importAudio several times just creates N maker layers, which
     197                                        // is sub-optimal.
     198                                        File sel[] = fc.getSelectedFiles();
     199                                        if(sel != null)
     200                                                for (int i = 0; i < sel.length; i++)
     201                                                        importAudio(sel[i]);
     202                                       
     203                                        Main.map.repaint();
     204                                }
    197205                        }
    198206                });
Note: See TracChangeset for help on using the changeset viewer.