Skip to content
Merged
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
3 changes: 2 additions & 1 deletion avalon/tools/loader/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ def keyPressEvent(self, event):
self.show_grouping_dialog()
return

return super(Window, self).keyPressEvent(event)
super(Window, self).keyPressEvent(event)
event.setAccepted(True) # Avoid interfering other widgets

def show_grouping_dialog(self):
subsets = self.data["model"]["subsets"]
Expand Down
10 changes: 10 additions & 0 deletions avalon/tools/projectmanager/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ def __init__(self, parent=None):

self.echo("Connected to project: {0}".format(project_name))

def keyPressEvent(self, event):
"""Custom keyPressEvent.

Override keyPressEvent to do nothing so that Maya's panels won't
take focus when pressing "SHIFT" whilst mouse is over viewport or
outliner. This way users don't accidently perform Maya commands
whilst trying to name an instance.

"""
Comment on lines +101 to +108
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc string was copied from Creator App.


def refresh(self):
self.data["model"]["assets"].refresh()

Expand Down
10 changes: 10 additions & 0 deletions avalon/tools/sceneinventory/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,16 @@ def __init__(self, parent=None):

tools_lib.refresh_family_config_cache()

def keyPressEvent(self, event):
"""Custom keyPressEvent.

Override keyPressEvent to do nothing so that Maya's panels won't
take focus when pressing "SHIFT" whilst mouse is over viewport or
outliner. This way users don't accidently perform Maya commands
whilst trying to name an instance.

"""

def refresh(self):
with tools_lib.preserve_expanded_rows(tree_view=self.view,
role=self.model.UniqueRole):
Expand Down
10 changes: 10 additions & 0 deletions avalon/tools/workfiles/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,16 @@ def __init__(self, parent=None):

self.resize(900, 600)

def keyPressEvent(self, event):
"""Custom keyPressEvent.

Override keyPressEvent to do nothing so that Maya's panels won't
take focus when pressing "SHIFT" whilst mouse is over viewport or
outliner. This way users don't accidently perform Maya commands
whilst trying to name an instance.

"""

def on_task_changed(self):
# Since we query the disk give it slightly more delay
tools_lib.schedule(self._on_task_changed, 100, channel="mongo")
Expand Down