mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 10:17:52 -06:00
Undo emit transformationChanges (caused a crash), themed objects in objects list. CURA-4525
This commit is contained in:
parent
2c831ceb05
commit
663ceab069
6 changed files with 19 additions and 15 deletions
|
@ -34,8 +34,6 @@ class ArrangeArray:
|
|||
if a.isEmpty:
|
||||
self._first_empty = i
|
||||
self._has_empty = True
|
||||
|
||||
Logger.log("d", "lala %s %s", self._first_empty, self._has_empty)
|
||||
return
|
||||
self._first_empty = None
|
||||
self._has_empty = False
|
||||
|
|
|
@ -40,7 +40,11 @@ class BuildPlateModel(ListModel):
|
|||
def maxBuildPlate(self):
|
||||
return self._max_build_plate
|
||||
|
||||
def updateMaxBuildPlate(self, source):
|
||||
def updateMaxBuildPlate(self, *args):
|
||||
if args:
|
||||
source = args[0]
|
||||
else:
|
||||
source = None
|
||||
if not issubclass(type(source), SceneNode):
|
||||
return
|
||||
max_build_plate = self._calcMaxBuildPlate()
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
|
||||
from UM.Application import Application
|
||||
from UM.Logger import Logger
|
||||
from UM.Scene.SceneNode import SceneNode
|
||||
|
||||
|
||||
## Make a SceneNode build plate aware CuraSceneNode objects all have this decorator.
|
||||
|
@ -14,13 +13,14 @@ class BuildPlateDecorator(SceneNodeDecorator):
|
|||
# Make sure that groups are set correctly
|
||||
# setBuildPlateForSelection in CuraActions makes sure that no single childs are set.
|
||||
self._build_plate_number = nr
|
||||
if self._node is not None:
|
||||
self._node.transformationChanged.emit()
|
||||
# if issubclass(type(self._node), SceneNode): # TODO: Crashes on ArrangeObjectsAllBuildPlatesJob
|
||||
# self._node.transformationChanged.emit()
|
||||
#self._node.transformationChanged.emit()
|
||||
if self._node and self._node.callDecoration("isGroup"):
|
||||
for child in self._node.getChildren():
|
||||
child.callDecoration("setBuildPlateNumber", nr)
|
||||
child.transformationChanged.emit()
|
||||
# if issubclass(type(child), SceneNode):
|
||||
# child.transformationChanged.emit()
|
||||
|
||||
def getBuildPlateNumber(self):
|
||||
return self._build_plate_number
|
||||
|
|
|
@ -316,7 +316,6 @@ Item
|
|||
{
|
||||
id: arrangeAllBuildPlatesAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:edit","Arrange All Models To All Build Plates");
|
||||
//iconName: "document-open";
|
||||
onTriggered: Printer.arrangeObjectsToAllBuildPlates();
|
||||
}
|
||||
|
||||
|
|
|
@ -146,6 +146,7 @@ Rectangle
|
|||
onClicked: UM.Preferences.setValue("view/filter_current_build_plate", checked)
|
||||
|
||||
text: catalog.i18nc("@option:check","See only current build plate");
|
||||
style: UM.Theme.styles.checkbox;
|
||||
|
||||
anchors
|
||||
{
|
||||
|
@ -192,6 +193,7 @@ Rectangle
|
|||
frameVisible: true
|
||||
height: UM.Theme.getSize("build_plate_selection_size").height
|
||||
width: parent.width - 2 * UM.Theme.getSize("default_margin").height
|
||||
style: UM.Theme.styles.scrollview
|
||||
|
||||
anchors
|
||||
{
|
||||
|
@ -222,9 +224,8 @@ Rectangle
|
|||
{
|
||||
id: arrangeAllBuildPlatesButton;
|
||||
text: catalog.i18nc("@action:button","Arrange to all build plates");
|
||||
//iconSource: UM.Theme.getIcon("load")
|
||||
//style: UM.Theme.styles.tool_button
|
||||
height: 25
|
||||
style: UM.Theme.styles.sidebar_action_button
|
||||
height: UM.Theme.getSize("objects_menu_button").height;
|
||||
tooltip: '';
|
||||
anchors
|
||||
{
|
||||
|
@ -244,7 +245,8 @@ Rectangle
|
|||
{
|
||||
id: arrangeBuildPlateButton;
|
||||
text: catalog.i18nc("@action:button","Arrange current build plate");
|
||||
height: 25
|
||||
style: UM.Theme.styles.sidebar_action_button
|
||||
height: UM.Theme.getSize("objects_menu_button").height;
|
||||
tooltip: '';
|
||||
anchors
|
||||
{
|
||||
|
|
|
@ -393,8 +393,9 @@
|
|||
|
||||
"jobspecs_line": [2.0, 2.0],
|
||||
|
||||
"objects_menu_size": [17, 40],
|
||||
"objects_menu_size": [20, 40],
|
||||
"objects_menu_size_collapsed": [15, 15],
|
||||
"build_plate_selection_size": [15, 5]
|
||||
"build_plate_selection_size": [15, 5],
|
||||
"objects_menu_button": [0.3, 2.7]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue