Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.shadergraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The version number for this package has increased due to a version update of a r
### Changed

### Fixed
- Fixed bug where an exception was thrown on undo operation after adding properties to a category [1348910] (https://fogbugz.unity3d.com/f/cases/1348910/)
- Fixed bug where it was not possible to switch to Graph Settings tab in Inspector if multiple nodes and an edge was selected [1357648] (https://fogbugz.unity3d.com/f/cases/1357648/)
- Fixed an incorrect direction transform from view to world space [1362034] (https://issuetracker.unity3d.com/product/unity/issues/guid/1362034/)
- Fixed ShaderGraph HDRP master preview disappearing for a few seconds when graph is modified [1330289] (https://issuetracker.unity3d.com/issues/shadergraph-hdrp-main-preview-is-invisible-until-moved)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,15 @@ void OnMouseDownEvent(MouseDownEvent e)
OpenTextEditor();
e.PreventDefault();
}
else if (e.clickCount == 1 && e.button == (int)MouseButton.LeftMouse && IsRenamable())
{
// Select the child elements within this category (the field views)
var fieldViews = this.Query<SGBlackboardField>();
foreach (var child in fieldViews.ToList())
{
this.AddToSelection(child);
}
}
}

internal void OpenTextEditor()
Expand Down Expand Up @@ -664,12 +673,6 @@ public override void Select(VisualElement selectionContainer, bool additive)
public override void OnSelected()
{
AddToClassList("selected");
// Select the child elements within this category (the field views)
var fieldViews = this.Query<SGBlackboardField>();
foreach (var child in fieldViews.ToList())
{
this.AddToSelection(child);
}
}

public override void OnUnselected()
Expand Down
3 changes: 3 additions & 0 deletions com.unity.shadergraph/Editor/Drawing/Views/GraphEditorView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,9 @@ public void HandleGraphChanges(bool wasUndoRedoPerformed)

previewManager.RenderPreviews(m_EditorWindow);


m_GraphView.wasUndoRedoPerformed = wasUndoRedoPerformed;

if (wasUndoRedoPerformed || m_InspectorView.doesInspectorNeedUpdate)
m_InspectorView.Update();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ void ChangePrecision(GraphPrecision newGraphDefaultPrecision)
public Action onConvertToSubgraphClick { get; set; }
public Vector2 cachedMousePosition { get; private set; }

public bool wasUndoRedoPerformed { get; set; }

// GraphView has UQueryState<Node> nodes built in to query for Nodes
// We need this for Contexts but we might as well cast it to a list once
public List<ContextView> contexts { get; set; }
Expand Down Expand Up @@ -1076,6 +1078,7 @@ void DeleteSelectionImplementation(string operationName, GraphView.AskUser askUs
// Updates selected graph elements after undo/redo
internal void RestorePersistentSelectionAfterUndoRedo()
{
wasUndoRedoPerformed = true;
m_UndoRedoPerformedMethodInfo?.Invoke(this, new object[] { });
}

Expand Down