Skip to content

Commit

Permalink
removed the previous added retain and log(for debugging)
Browse files Browse the repository at this point in the history
  • Loading branch information
0SlowPoke0 committed Dec 12, 2024
1 parent e1c53fd commit 80c02d3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1607,8 +1607,6 @@ impl NodeNetworkInterface {
return;
};

network_metadata.persistent_metadata.selection_undo_history.retain(|selected_nodes| selected_nodes.has_selected_nodes());

if let Some(selection_state) = network_metadata.persistent_metadata.selection_undo_history.pop_back() {
network_metadata.persistent_metadata.selection_redo_history.push_front(selection_state);
}
Expand All @@ -1620,8 +1618,6 @@ impl NodeNetworkInterface {
return;
};

network_metadata.persistent_metadata.selection_redo_history.retain(|selected_nodes| selected_nodes.has_selected_nodes());

if let Some(selection_state) = network_metadata.persistent_metadata.selection_redo_history.pop_front() {
network_metadata.persistent_metadata.selection_undo_history.push_back(selection_state);
}
Expand Down
4 changes: 1 addition & 3 deletions editor/src/messages/tool/tool_messages/select_tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1008,9 +1008,7 @@ impl Fsm for SelectToolFsmState {
let quad = tool_data.selection_quad();
let new_selected: HashSet<_> = document.intersect_quad_no_artboards(quad, input).collect();
let current_selected: HashSet<_> = document.network_interface.selected_nodes(&[]).unwrap().selected_layers(document.metadata()).collect();
if new_selected.is_empty() {
log::info!("Empty selection detected (only artboards). Skipping history update.");
}

if new_selected != current_selected && !new_selected.is_empty() {
tool_data.layers_dragging = new_selected.into_iter().collect();
responses.add(NodeGraphMessage::SelectedNodesSet {
Expand Down

0 comments on commit 80c02d3

Please sign in to comment.