From aa1eb6c809ef1e0e050bfeac53e9f2ea4f11330c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 18 十二月 2020 21:00:48 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into NewFilePath

---
 HDL_ON/Entity/Room.cs |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/HDL_ON/Entity/Room.cs b/HDL_ON/Entity/Room.cs
index dcad772..0f3cc1d 100644
--- a/HDL_ON/Entity/Room.cs
+++ b/HDL_ON/Entity/Room.cs
@@ -46,7 +46,7 @@
         public SpatialInfo(string spatialType)
         {
             roomType = "FLOOR";
-            parentId = UserInfo.Current.CurReginID;
+            parentId = DB_ResidenceData.Instance.CurrentRegion.RegionID;
         }
 
         public string roomId = "";
@@ -420,15 +420,19 @@
             rooms = null;
         }
 
-        public void ClearRooms()
+        public void Clear()
         {
-            if (floors != null)
+            if (_currentSpatial != null)
             {
-                floors.Clear();
-            }
-            if (rooms != null)
-            {
-                rooms.Clear();
+                if (_currentSpatial.floors != null)
+                {
+                    _currentSpatial.floors.Clear();
+                }
+                if (_currentSpatial.rooms != null)
+                {
+                    _currentSpatial.rooms.Clear();
+                }
+                _currentSpatial = null;
             }
         }
 
@@ -519,7 +523,7 @@
             {
                 if (CurrentSpatial.FloorList.Count > 0)
                 {
-                    var f = CurrentSpatial.FloorList.Find((obj) => obj.roomId == parentId);
+                    var f = CurrentSpatial.FloorList.Find((obj) => obj.uid == parentId);
                     if (f != null)
                     {
                         return f.roomName + " ";

--
Gitblit v1.8.0