Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions UM/Controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,17 +428,17 @@ def getScene(self) -> Scene:
def event(self, event: Event):
"""Process an event

The event is first passed to the selection tool, then the active tool and finally the camera tool.
The event is first passed to the active tool, then the selection tool and finally the camera tool.
If none of these events handle it (when they return something that does not evaluate to true)
a context menu signal is emitted.

:param event: event to be handle.
"""

if self._selection_tool and self._selection_tool.event(event):
if self._active_tool and self._active_tool.event(event):
return

if self._active_tool and self._active_tool.event(event):
if self._selection_tool and self._selection_tool.event(event):
return

if self._camera_tool and self._camera_tool.event(event):
Expand Down
4 changes: 4 additions & 0 deletions plugins/Tools/MirrorTool/MirrorTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ def event(self, event):
if not id:
return False

node = self.getController().getScene().findObject(id)
if node and not Selection.isSelected(node):
return False

if self._handle.isAxis(id):
self.setLockedAxis(id)
self._operation_started = True
Expand Down
4 changes: 4 additions & 0 deletions plugins/Tools/RotateTool/RotateTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ def event(self, event):
if not id:
return False

node = self.getController().getScene().findObject(id)
if node and not Selection.isSelected(node):
return False

if id in self._handle.getExtraWidgetsColorMap():
self._active_widget = self._handle.ExtraWidgets(id)
self._widget_click_start = time.monotonic()
Expand Down
4 changes: 4 additions & 0 deletions plugins/Tools/ScaleTool/ScaleTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ def event(self, event):
if not id:
return False

node = self.getController().getScene().findObject(id)
if node and not Selection.isSelected(node):
return False

if self._handle.isAxis(id):
self.setLockedAxis(id)
self._saved_handle_position = self._handle.getWorldPosition()
Expand Down
4 changes: 4 additions & 0 deletions plugins/Tools/TranslateTool/TranslateTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ def event(self, event: Event) -> bool:
if not id:
return False

node = self.getController().getScene().findObject(id)
if node and not Selection.isSelected(node):
return False

if id in self._enabled_axis:
self.setLockedAxis(id)
elif self._handle.isAxis(id):
Expand Down
Loading