mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
!B 节点选择窗口无法关闭
This commit is contained in:
parent
284ecddc50
commit
02f59984a0
@ -221,13 +221,18 @@ namespace XNodeEditor {
|
|||||||
else if (NodeEditorPreferences.GetSettings().dragToCreate && autoConnectOutput != null) {
|
else if (NodeEditorPreferences.GetSettings().dragToCreate && autoConnectOutput != null) {
|
||||||
MenuPopupWindow menu = new MenuPopupWindow();
|
MenuPopupWindow menu = new MenuPopupWindow();
|
||||||
graphEditor.AddContextMenuItems(menu);
|
graphEditor.AddContextMenuItems(menu);
|
||||||
|
|
||||||
|
menu.OnCloseA += () =>
|
||||||
|
{
|
||||||
|
//Release dragged connection
|
||||||
|
draggedOutput = null;
|
||||||
|
draggedOutputTarget = null;
|
||||||
|
EditorUtility.SetDirty(graph);
|
||||||
|
if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets();
|
||||||
|
};
|
||||||
|
|
||||||
PopupWindow.Show(new Rect(Event.current.mousePosition, Vector2.zero),menu);
|
PopupWindow.Show(new Rect(Event.current.mousePosition, Vector2.zero),menu);
|
||||||
}
|
}
|
||||||
//Release dragged connection
|
|
||||||
draggedOutput = null;
|
|
||||||
draggedOutputTarget = null;
|
|
||||||
EditorUtility.SetDirty(graph);
|
|
||||||
if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets();
|
|
||||||
} else if (currentActivity == NodeActivity.DragNode) {
|
} else if (currentActivity == NodeActivity.DragNode) {
|
||||||
IEnumerable<XNode.Node> nodes = Selection.objects.Where(x => x is XNode.Node).Select(x => x as XNode.Node);
|
IEnumerable<XNode.Node> nodes = Selection.objects.Where(x => x is XNode.Node).Select(x => x as XNode.Node);
|
||||||
foreach (XNode.Node node in nodes) EditorUtility.SetDirty(node);
|
foreach (XNode.Node node in nodes) EditorUtility.SetDirty(node);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user