mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-04 08:48:11 +08:00
Fix artboard labels not reappearing once the node graph is closed to return to the viewport (#3061)
Closes #3045
This commit is contained in:
@@ -582,6 +582,7 @@ impl MessageHandler<DocumentMessage, DocumentMessageContext<'_>> for DocumentMes
|
|||||||
responses.add(NodeGraphMessage::UpdateHints);
|
responses.add(NodeGraphMessage::UpdateHints);
|
||||||
} else {
|
} else {
|
||||||
responses.add(ToolMessage::ActivateTool { tool_type: *current_tool });
|
responses.add(ToolMessage::ActivateTool { tool_type: *current_tool });
|
||||||
|
responses.add(OverlaysMessage::Draw); // Redraw overlays when graph is closed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DocumentMessage::GraphViewOverlayToggle => {
|
DocumentMessage::GraphViewOverlayToggle => {
|
||||||
|
|||||||
@@ -1680,6 +1680,7 @@ impl<'a> MessageHandler<NodeGraphMessage, NodeGraphMessageContext<'a>> for NodeG
|
|||||||
responses.add(DocumentMessage::RenderRulers);
|
responses.add(DocumentMessage::RenderRulers);
|
||||||
responses.add(DocumentMessage::RenderScrollbars);
|
responses.add(DocumentMessage::RenderScrollbars);
|
||||||
responses.add(NodeGraphMessage::SendGraph);
|
responses.add(NodeGraphMessage::SendGraph);
|
||||||
|
responses.add(OverlaysMessage::Draw); // Redraw overlays to update artboard names
|
||||||
}
|
}
|
||||||
NodeGraphMessage::SetDisplayNameImpl { node_id, alias } => {
|
NodeGraphMessage::SetDisplayNameImpl { node_id, alias } => {
|
||||||
network_interface.set_display_name(&node_id, alias, selection_network_path);
|
network_interface.set_display_name(&node_id, alias, selection_network_path);
|
||||||
|
|||||||
@@ -156,6 +156,9 @@ impl MessageHandler<ToolMessage, ToolMessageContext<'_>> for ToolMessageHandler
|
|||||||
// Subscribe new tool
|
// Subscribe new tool
|
||||||
tool_data.tools.get(&tool_type).unwrap().activate(responses);
|
tool_data.tools.get(&tool_type).unwrap().activate(responses);
|
||||||
|
|
||||||
|
// Re-add the artboard overlay provider when tools are reactivated
|
||||||
|
responses.add(OverlaysMessage::AddProvider(ARTBOARD_OVERLAY_PROVIDER));
|
||||||
|
|
||||||
// Send the SelectionChanged message to the active tool, this will ensure the selection is updated
|
// Send the SelectionChanged message to the active tool, this will ensure the selection is updated
|
||||||
responses.add(BroadcastEvent::SelectionChanged);
|
responses.add(BroadcastEvent::SelectionChanged);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user