Merge remote-tracking branch 'gravitystorm/snapshotserver' into refactor
[potlatch2.git] / net / systemeD / potlatch2 / panels / BackgroundPanel.mxml
index cd60f017d9aeef637cbf937fe39cea33f3c7aa13..982feb2425862041f1fc456c776b9c1498cc89dc 100644 (file)
       <mx:DataGridColumn editable="false" dataField="value" headerText="value" />
     </mx:columns>
   </mx:DataGrid>
+  <mx:Text text="All the data copied to the main layer? Click 'complete'!" />
+  <mx:Button label="Complete" click="markComplete()"/>
   <mx:Script><![CDATA[
 
       import net.systemeD.halcyon.connection.*;
       import net.systemeD.halcyon.MapPaint;
+      import net.systemeD.potlatch2.utils.SnapshotConnection;
       import mx.collections.*;
 
       private var selectedEntity:Entity;
             for each(var tag:Tag in tags) { tagDataProvider.addItem(tag); }
       }
 
+      private function markComplete():void {
+            if (selectedEntity.connection is SnapshotConnection) {
+                SnapshotConnection(selectedEntity.connection).markComplete(selectedEntity);
+            }
+      }
       ]]>
   </mx:Script>
 </mx:VBox>
\ No newline at end of file