增加访问同步
This commit is contained in:
@@ -320,12 +320,15 @@ namespace SpineViewer
|
|||||||
|
|
||||||
if (SpineListView is not null)
|
if (SpineListView is not null)
|
||||||
{
|
{
|
||||||
foreach (var spine in SpineListView.Spines)
|
lock (SpineListView.Spines)
|
||||||
{
|
{
|
||||||
if (spine.Bounds.Contains(src))
|
foreach (var spine in SpineListView.Spines)
|
||||||
{
|
{
|
||||||
draggingSpine = spine;
|
if (spine.Bounds.Contains(src))
|
||||||
break;
|
{
|
||||||
|
draggingSpine = spine;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -360,7 +363,6 @@ namespace SpineViewer
|
|||||||
if ((e.Button & MouseButtons.Right) != 0)
|
if ((e.Button & MouseButtons.Right) != 0)
|
||||||
{
|
{
|
||||||
draggingSpine = null;
|
draggingSpine = null;
|
||||||
SpineListView?.PropertyGrid?.Refresh(); // 面板刷新不能放在 Move 事件里, 会导致一直在 Move
|
|
||||||
|
|
||||||
draggingSrc = null;
|
draggingSrc = null;
|
||||||
Cursor = Cursors.Default;
|
Cursor = Cursors.Default;
|
||||||
@@ -371,7 +373,6 @@ namespace SpineViewer
|
|||||||
{
|
{
|
||||||
draggingSrc = null;
|
draggingSrc = null;
|
||||||
draggingSpine = null;
|
draggingSpine = null;
|
||||||
SpineListView?.PropertyGrid?.Refresh();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -447,11 +448,14 @@ namespace SpineViewer
|
|||||||
// 渲染 Spine
|
// 渲染 Spine
|
||||||
if (SpineListView is not null)
|
if (SpineListView is not null)
|
||||||
{
|
{
|
||||||
foreach (var spine in SpineListView.Spines.Reverse())
|
lock (SpineListView.Spines)
|
||||||
{
|
{
|
||||||
spine.Update(delta);
|
foreach (var spine in SpineListView.Spines.Reverse())
|
||||||
RenderWindow.Draw(spine);
|
{
|
||||||
// TODO: 渲染包围盒
|
spine.Update(delta);
|
||||||
|
RenderWindow.Draw(spine);
|
||||||
|
// TODO: 渲染包围盒
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user