From: Andy Allan Date: Sun, 14 Feb 2010 16:48:47 +0000 (+0000) Subject: New Relation button X-Git-Tag: 0.5~535 X-Git-Url: https://git.openstreetmap.org/potlatch2.git/commitdiff_plain/9d9fa2e15ac71cdce1b3d4ba1fd69d213773d808 New Relation button --- diff --git a/TODO.txt b/TODO.txt index a66ff103..fd4c9854 100644 --- a/TODO.txt +++ b/TODO.txt @@ -33,8 +33,8 @@ Potlatch 2: main outstanding issues * UI for geometry operations * Keyboard shortcuts * CSS editing -* "New relations" panel * Direct click-to-edit of relation role should actually work +* Relation member changes should update TagViewer automatically == Tagging == diff --git a/net/systemeD/potlatch2/RelationSelectPanel.mxml b/net/systemeD/potlatch2/RelationSelectPanel.mxml index 5b2a8bd8..136fa9e8 100644 --- a/net/systemeD/potlatch2/RelationSelectPanel.mxml +++ b/net/systemeD/potlatch2/RelationSelectPanel.mxml @@ -42,12 +42,23 @@ relation.appendMember(new RelationMember(entity, '')); PopUpManager.removePopUp(this); } + + public function closeAndNewRelation():void { + var relation:Relation = conn.createRelation({}, [new RelationMember(entity, '')]) + PopUpManager.removePopUp(this); + trace("edit relation "+id); + var panel:RelationEditorPanel = RelationEditorPanel( + PopUpManager.createPopUp(Application(Application.application), RelationEditorPanel, true)); + panel.setRelation(relation); + PopUpManager.centerPopUp(panel); + } + ]]> - +