mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-17 09:15:58 +08:00
Fix ctrl+z issues
CURA-7951`
This commit is contained in:
parent
668038c59f
commit
719b11655c
@ -5,7 +5,7 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
|
|
||||||
class Arranger:
|
class Arranger:
|
||||||
def createGroupOperationForArrange(self, add_new_nodes_in_scene: bool = True) -> Tuple["GroupedOperation", int]:
|
def createGroupOperationForArrange(self, add_new_nodes_in_scene: bool = False) -> Tuple["GroupedOperation", int]:
|
||||||
"""
|
"""
|
||||||
Find placement for a set of scene nodes, but don't actually move them just yet.
|
Find placement for a set of scene nodes, but don't actually move them just yet.
|
||||||
:param add_new_nodes_in_scene: Whether to create new scene nodes before applying the transformations and rotations
|
:param add_new_nodes_in_scene: Whether to create new scene nodes before applying the transformations and rotations
|
||||||
@ -16,7 +16,7 @@ class Arranger:
|
|||||||
"""
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def arrange(self, add_new_nodes_in_scene: bool = True) -> bool:
|
def arrange(self, add_new_nodes_in_scene: bool = False) -> bool:
|
||||||
"""
|
"""
|
||||||
Find placement for a set of scene nodes, and move them by using a single grouped operation.
|
Find placement for a set of scene nodes, and move them by using a single grouped operation.
|
||||||
:param add_new_nodes_in_scene: Whether to create new scene nodes before applying the transformations and rotations
|
:param add_new_nodes_in_scene: Whether to create new scene nodes before applying the transformations and rotations
|
||||||
|
@ -37,7 +37,7 @@ class GridArrange(Arranger):
|
|||||||
self._initial_leftover_grid_x = math.floor(self._initial_leftover_grid_x)
|
self._initial_leftover_grid_x = math.floor(self._initial_leftover_grid_x)
|
||||||
self._initial_leftover_grid_y = math.floor(self._initial_leftover_grid_y)
|
self._initial_leftover_grid_y = math.floor(self._initial_leftover_grid_y)
|
||||||
|
|
||||||
def createGroupOperationForArrange(self, add_new_nodes_in_scene: bool = True) -> Tuple[GroupedOperation, int]:
|
def createGroupOperationForArrange(self, add_new_nodes_in_scene: bool = False) -> Tuple[GroupedOperation, int]:
|
||||||
# Find grid indexes that intersect with fixed objects
|
# Find grid indexes that intersect with fixed objects
|
||||||
fixed_nodes_grid_ids = set()
|
fixed_nodes_grid_ids = set()
|
||||||
for node in self._fixed_nodes:
|
for node in self._fixed_nodes:
|
||||||
|
@ -124,7 +124,7 @@ class Nest2DArrange(Arranger):
|
|||||||
|
|
||||||
return found_solution_for_all, node_items
|
return found_solution_for_all, node_items
|
||||||
|
|
||||||
def createGroupOperationForArrange(self, add_new_nodes_in_scene: bool = True) -> Tuple[GroupedOperation, int]:
|
def createGroupOperationForArrange(self, add_new_nodes_in_scene: bool = False) -> Tuple[GroupedOperation, int]:
|
||||||
scene_root = Application.getInstance().getController().getScene().getRoot()
|
scene_root = Application.getInstance().getController().getScene().getRoot()
|
||||||
found_solution_for_all, node_items = self.findNodePlacement()
|
found_solution_for_all, node_items = self.findNodePlacement()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user