mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 09:47:50 -06:00
Always deactivate the tool when the selection is cleared
This commit is contained in:
parent
f4ea538615
commit
0f65cf3cf1
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue