Changeset 30709 in osm for applications/editors/josm
- Timestamp:
- 2014-10-11T09:24:53+02:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/FastDraw
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified applications/editors/josm/plugins/FastDraw/build.xml ¶
r30416 r30709 2 2 <project name="FastDraw" default="dist" basedir="."> 3 3 <!-- enter the SVN commit message --> 4 <property name="commit.message" value="JOSM/FastDraw: line stroke and point size customization"/>4 <property name="commit.message" value="JOSM/FastDraw: do not catch keys from other windows, fix default tags combobox"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 6 <property name="plugin.main.version" value="7001"/> -
TabularUnified applications/editors/josm/plugins/FastDraw/nbproject/project.xml ¶
r30416 r30709 4 4 <configuration> 5 5 <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1"> 6 <name>FastDraw</name> 7 </general-data> 8 <general-data xmlns="http://www.netbeans.org/ns/freeform-project/2"> 6 9 <!-- Не используйте диалоговое окно свойств проекта при редактировании данного файла вручную. --> 7 10 <name>FastDraw</name> … … 13 16 <location>src</location> 14 17 </source-folder> 18 <build-file> 19 <location>../../dist/FastDraw.jar</location> 20 </build-file> 15 21 </folders> 16 22 <ide-actions> … … 56 62 </context-menu> 57 63 </view> 64 <subprojects/> 58 65 </general-data> 59 66 <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/3"> 60 67 <compilation-unit> 61 68 <package-root>src</package-root> 62 <classpath mode="compile">../../core/src</classpath> 69 <classpath mode="compile">../../core/src;../../core/dist/josm-custom.jar</classpath> 63 70 <built-to>../../dist/FastDraw.jar</built-to> 64 71 <source-level>1.7</source-level> -
TabularUnified applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawConfigDialog.java ¶
r30532 r30709 7 7 import java.text.NumberFormat; 8 8 import java.text.ParseException; 9 import java.util.ArrayList; 10 import java.util.Collection; 11 import java.util.Collections; 9 12 10 13 import javax.swing.AbstractAction; … … 61 64 }); 62 65 pasteButton.setToolTipText(tr("Try copying tags from properties table")); 63 64 addTags.setPossibleItems(Main.pref.getCollection("fastdraw.tags-history")); 66 ArrayList<String> history = new ArrayList<>(Main.pref.getCollection("fastdraw.tags-history")); 67 while (history.remove("")) { }; 68 addTags.setPossibleItems(history); 65 69 66 70 all.add(label1,GBC.std().insets(10,0,0,0)); … … 118 122 settings.simplifyMode=combo1.getSelectedIndex(); 119 123 settings.autoTags=addTags.getText(); 120 addTags.addCurrentItemToHistory(); 124 if (!settings.autoTags.isEmpty()) { 125 addTags.addCurrentItemToHistory(); 126 } 121 127 Main.pref.putCollection("fastdraw.tags-history", addTags.getHistory()); 122 128 settings.savePrefs(); -
TabularUnified applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java ¶
r29595 r30709 9 9 import java.awt.AWTEvent; 10 10 import java.awt.Color; 11 import java.awt.Component; 11 12 import java.awt.Cursor; 12 13 import java.awt.Graphics2D; 14 import java.awt.KeyboardFocusManager; 13 15 import java.awt.Point; 14 16 import java.awt.Toolkit; 15 17 import java.awt.event.*; 16 18 import java.util.*; 19 import javax.swing.JFrame; 17 20 import javax.swing.JOptionPane; 21 import javax.swing.SwingUtilities; 18 22 import javax.swing.Timer; 19 23 … … 265 269 set.add((e.getKeyCode())); 266 270 } 267 doKeyEvent((KeyEvent) event); 271 // check if key press is done in main window, not in dialogs 272 Component focused = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); 273 if (SwingUtilities.getWindowAncestor(focused) instanceof JFrame) { 274 doKeyEvent((KeyEvent) event); 275 } 268 276 } 269 277 if (event.getID() == KeyEvent.KEY_RELEASED) {
Note:
See TracChangeset
for help on using the changeset viewer.