<sidepanel:BackgroundPanel id="backgroundPanelContents" width="100%"/>
</mx:VBox>
+ <!-- merge tags from background layer -->
+
+ <mx:VBox id="backgroundMergePanel" width="100%" height="100%" horizontalScrollPolicy="off" styleName="dndPanelVbox">
+ <sidepanel:BackgroundMergePanel id="backgroundMergePanelContents" width="100%" />
+ </mx:VBox>
+
</mx:ViewStack>
<fx:Script><![CDATA[
import net.systemeD.halcyon.connection.*;
import net.systemeD.halcyon.MapPaint;
+ import net.systemeD.potlatch2.EditController;
import net.systemeD.potlatch2.mapfeatures.*;
import net.systemeD.potlatch2.utils.*;
import net.systemeD.controls.CollapsiblePanel;
[Bindable] private var editorStack:Container;
public var mapFeatures:MapFeatures;
+ public var controller:EditController;
private var selectedEntity:Entity;
private var connection:Connection;
private var currentCategorySelector:CategorySelector;
sidebar.selectedChild = tagsPanel;
}
+ } else if (entities.length==2
+ && xor(entities[0].connection is SnapshotConnection, entities[1].connection is SnapshotConnection)
+ && xor(!controller.map.getLayerForEntity(entities[0]).isBackground, !controller.map.getLayerForEntity(entities[1]).isBackground) ) {
+ backgroundMergePanelContents.init(entities);
+ sidebar.selectedChild = backgroundMergePanel;
+
} else if(isMultipleEditable(entities)) {
selectedEntity = new EntityCollection(entities);
selectedEntity.addEventListener(Connection.TAG_CHANGED, tagChanged);
UIComponent.resumeBackgroundProcessing();
}
+ private function xor(a:Boolean, b:Boolean):Boolean {
+ return ( a || b) && !(a && b);
+ }
+
private function refreshFeatureIcon():void {
var oldFeature:Feature = feature;
feature = selectedEntity == null ? null : mapFeatures.findMatchingFeature(selectedEntity);