mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 03:35:57 +08:00
Always deactivate the tool when the selection is cleared
This commit is contained in:
parent
f4ea538615
commit
0f65cf3cf1
@ -110,13 +110,13 @@ class PrinterApplication(QtApplication):
|
||||
engine.rootContext().setContextProperty('Printer', self)
|
||||
|
||||
def onSelectionChanged(self):
|
||||
if Selection.getCount() > 0:
|
||||
if Selection.hasSelection():
|
||||
if not self.getController().getActiveTool():
|
||||
self.getController().setActiveTool('TranslateTool')
|
||||
|
||||
self.getController().getTool('CameraTool').setOrigin(Selection.getSelectedObject(0).getGlobalPosition())
|
||||
else:
|
||||
if self.getController().getActiveTool() and self.getController().getActiveTool().getName() == 'TranslateTool':
|
||||
if self.getController().getActiveTool():
|
||||
self.getController().setActiveTool(None)
|
||||
|
||||
@pyqtSlot(QUrl)
|
||||
|
Loading…
x
Reference in New Issue
Block a user