Ignore:
Timestamp:
11.07.2009 09:32:42 (3 years ago)
Author:
Gubaer
Message:

added: improved tag editor grid in relation editor (borrowed code from tag editor plugin)
removed: realEqual() on OsmPrimitive, Node, etc.

File:
1 edited

Legend:

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

    r1710 r1762  
    1616public abstract class RelationEditor extends ExtendedDialog { 
    1717 
     18    /** keeps track of open relation editors */ 
     19    static private RelationDialogManager relationDialogManager; 
     20 
     21    /** 
     22     * Replies the singleton {@see RelationDialogManager} 
     23     *  
     24     * @return the singleton {@see RelationDialogManager} 
     25     */ 
     26    static public RelationDialogManager getRelationDialogManager() { 
     27        if (relationDialogManager == null) { 
     28            relationDialogManager = new RelationDialogManager(); 
     29        } 
     30        return relationDialogManager; 
     31    } 
     32 
    1833    public static ArrayList<Class<RelationEditor>> editors = new ArrayList<Class<RelationEditor>>(); 
    1934 
     
    2237     * editing. 
    2338     */ 
    24     protected Relation relation; 
    25     protected Relation clone; 
     39    private Relation relation; 
     40    private Relation clone; 
    2641 
    2742    /** 
     
    5772            } 
    5873        } 
    59         return new GenericRelationEditor(r, selectedMembers); 
     74        if (getRelationDialogManager().isOpenInEditor(r)) 
     75            return getRelationDialogManager().getEditorForRelation(r); 
     76        else { 
     77            RelationEditor editor = new GenericRelationEditor(r, selectedMembers); 
     78            getRelationDialogManager().register(r, editor); 
     79            return editor; 
     80        } 
    6081    } 
    6182 
     
    84105        } 
    85106    } 
     107 
     108    protected Relation getRelation() { 
     109        return relation; 
     110    } 
     111 
     112    protected Relation getClone() { 
     113        return clone; 
     114    } 
    86115} 
Note: See TracChangeset for help on using the changeset viewer.