From ae86b09b30621e1a8512c6bcdd7e22e9c67a5402 Mon Sep 17 00:00:00 2001
From: lss <lsc@hdlchina.com.cn>
Date: 星期二, 17 五月 2022 14:02:06 +0800
Subject: [PATCH] Merge branch 'dev' into lss

---
 HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
index 13f241a..f70fc3b 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
@@ -436,7 +436,10 @@
                         var tempScene = sceneList.Find((obj) => obj.userSceneId == scene.userSceneId);
                         if (tempScene != null)
                         {
-                            scene = tempScene;
+                            scene.name = tempScene.name;
+                            scene.delay = tempScene.delay;
+                            scene.roomIds = tempScene.roomIds;
+                            scene.functions = tempScene.functions;
                         }
                         Application.RunOnMainThread(() =>
                         {
@@ -560,7 +563,7 @@
 
                 EventHandler<MouseEventArgs> skipEvent = (sender, e) =>
                 {
-                    var ssf = new SceneFunctionInfoEditPage(scene, scenefunction, refreshFunctionRowAction);
+                    var ssf = new SceneFunctionInfoEditPage(scene, scenefunction.localFunction.ConvertSceneFunction(), refreshFunctionRowAction);
                     MainPage.BasePageView.AddChidren(ssf);
                     ssf.LoadPage();
                     MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
@@ -839,6 +842,12 @@
             UploadImage(selectImagePath, addSceneImageView, scene, uploadSuccessAction);
         }
 
+        public override void RemoveFromParent()
+        {
+            backAction();
+            base.RemoveFromParent();
+        }
+
         /// <summary>
         /// 瀹屾垚鎸夐挳鐐瑰嚮浜嬩欢
         /// </summary>
@@ -868,7 +877,7 @@
                     }
                     scene.EditScene();
                     FunctionList.List.scenes.Add(scene);
-                    backAction();
+                    //backAction();
                     this.RemoveFromParent();
                 }
                 if (btnComplete.TextID == StringId.Del)
@@ -876,7 +885,7 @@
                     Action action = () =>
                     {
                         FunctionList.List.DeleteScene(scene,true);
-                        backAction();
+                        //backAction();
                         this.RemoveFromParent();
                     };
                     new PublicAssmebly().TipOptionMsg(StringId.Tip, StringId.DeleteSceneTip, action);

--
Gitblit v1.8.0