Changeset 3200 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2010-04-23T10:26:20+02:00 (14 years ago)
Author:
bastiK
Message:

fixed #4930 - Relation editor "creeps"

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java

    r3182 r3200  
    233233     * upper left corner is close to <code>p</code>.
    234234     */
    235     protected boolean hasEditorWithCloseUpperLeftCorner(Point p) {
     235    protected boolean hasEditorWithCloseUpperLeftCorner(Point p, RelationEditor thisEditor) {
    236236        for (RelationEditor editor: openDialogs.values()) {
     237            if (editor == thisEditor)
     238                continue;
    237239            Point corner = editor.getLocation();
    238240            if (p.x >= corner.x -5 && corner.x + 5 >= p.x
     
    255257        if (!openDialogs.isEmpty()) {
    256258            Point corner = editor.getLocation();
    257             while(hasEditorWithCloseUpperLeftCorner(corner)) {
     259            while(hasEditorWithCloseUpperLeftCorner(corner, editor)) {
    258260                // shift a little, so that the dialogs are not exactly on top of each other
    259261                corner.x += 20;
  • trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java

    r3175 r3200  
    685685
    686686    private static Collection<String> getToolString() {
    687         return Main.pref.getCollection("toolbar", Arrays.asList(deftoolbar));
     687        Collection<String> toolStr = Main.pref.getCollection("toolbar", Arrays.asList(deftoolbar));
     688        if (toolStr == null || toolStr.size() == 0) {
     689            toolStr = Arrays.asList(deftoolbar);
     690        }
     691        return toolStr;
    688692    }
    689693
Note: See TracChangeset for help on using the changeset viewer.