Index: lams_central/web/lams_authoring.swf =================================================================== diff -u -rb67f799fb4c81cd50dbcb8a5d85546ecd4852f98 -r26439593198fe66ffa48fe8aa5356edd7c20653a Binary files differ Index: lams_central/web/lams_authoring_library.swf =================================================================== diff -u -rb67f799fb4c81cd50dbcb8a5d85546ecd4852f98 -r26439593198fe66ffa48fe8aa5356edd7c20653a Binary files differ Index: lams_flash/src/central/flash/org/lamsfoundation/lams/authoring/cv/CanvasModel.as =================================================================== diff -u -r434299dda2df6be5bd2f7dff51ed8872a3469058 -r26439593198fe66ffa48fe8aa5356edd7c20653a --- lams_flash/src/central/flash/org/lamsfoundation/lams/authoring/cv/CanvasModel.as (.../CanvasModel.as) (revision 434299dda2df6be5bd2f7dff51ed8872a3469058) +++ lams_flash/src/central/flash/org/lamsfoundation/lams/authoring/cv/CanvasModel.as (.../CanvasModel.as) (revision 26439593198fe66ffa48fe8aa5356edd7c20653a) @@ -307,36 +307,6 @@ } - /** - * Removes the activity from the Canvas Model - * @usage - * @param activityUIID - * @return - */ - - /** - *Called by the view when a template activity icon is dropped - */ - public function removeOptionalCA(ca:Object, parentID){ - //lets do a test to see if we got the canvas - Debugger.log('Removed Child '+ca.activity.activityUIID+ 'from : '+ca.activity.parentUIID,Debugger.GEN,'removeOptionalCA','CanvasModel'); - haltRefresh(true); - - ca.activity.parentUIID = (activeView instanceof CanvasBranchView) ? activeView.defaultSequenceActivity.activityUIID : null; - ca.activity.orderID = null; - ca.activity.parentActivityID = (activeView instanceof CanvasBranchView) ? activeView.defaultSequenceActivity.activityID : null; - - if(ca.activity.isBranchingActivity()) - ca.activity.clear = true; - - removeActivity(ca.activity.activityUIID); - removeActivity(parentID); - - haltRefresh(false); - setDirty(); - - } - public function removeOptionalSequenceCA(ca:Object, parentID){ haltRefresh(true); @@ -346,6 +316,9 @@ ca.activity.orderID = null; ca.activity.parentActivityID = (activeView instanceof CanvasBranchView) ? activeView.defaultSequenceActivity.activityID : null; + if(ca.activity.isBranchingActivity()) + ca.activity.clear = true; + if(!(activeView instanceof CanvasComplexView)) removeActivity(parentID); haltRefresh(false); @@ -1127,18 +1100,18 @@ if(BranchingActivity(ba.activity).clear) { clearBranchingActivity(ba); - } - - if(ba.activity.branchView != null) { + MovieClipUtils.doLater(Proxy.create(_cv, _cv.openBranchView, currentBranchingActivity, visible)); + } else if(ba.activity.branchView != null) { ba.activity.branchView.prevActiveView = activeView; activeView = (visible) ? ba.activity.branchView : activeView; ba.activity.branchView.setOpen(visible); ba.activity.branchView.open(); openBranchingActivities.push(ba); - } else { _cv.openBranchView(currentBranchingActivity, visible); } + } else { + _cv.openBranchView(currentBranchingActivity, visible); } - _lastBranchActionType = null; + _lastBranchActionType = null; } } Index: lams_flash/src/central/flash/org/lamsfoundation/lams/authoring/cv/CanvasSuperModel.as =================================================================== diff -u -r434299dda2df6be5bd2f7dff51ed8872a3469058 -r26439593198fe66ffa48fe8aa5356edd7c20653a --- lams_flash/src/central/flash/org/lamsfoundation/lams/authoring/cv/CanvasSuperModel.as (.../CanvasSuperModel.as) (revision 434299dda2df6be5bd2f7dff51ed8872a3469058) +++ lams_flash/src/central/flash/org/lamsfoundation/lams/authoring/cv/CanvasSuperModel.as (.../CanvasSuperModel.as) (revision 26439593198fe66ffa48fe8aa5356edd7c20653a) @@ -932,6 +932,37 @@ } } + + /** + * Removes the activity from the Canvas Model + * @usage + * @param activityUIID + * @return + */ + + /** + *Called by the view when a template activity icon is dropped + */ + public function removeOptionalCA(ca:Object, parentID){ + //lets do a test to see if we got the canvas + Debugger.log('Removed Child '+ca.activity.activityUIID+ 'from : '+ca.activity.parentUIID,Debugger.GEN,'removeOptionalCA','CanvasModel'); + haltRefresh(true); + + ca.activity.parentUIID = (activeView instanceof CanvasBranchView) ? activeView.defaultSequenceActivity.activityUIID : null; + ca.activity.orderID = null; + ca.activity.parentActivityID = (activeView instanceof CanvasBranchView) ? activeView.defaultSequenceActivity.activityID : null; + + if(ca.activity.isBranchingActivity()) + ca.activity.clear = true; + + removeActivity(ca.activity.activityUIID); + removeActivity(parentID); + + haltRefresh(false); + setDirty(); + + } + public function removeActivityOnBin(activityUIID):Object{ //dispatch an event to show the design has changed