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
8 changes: 7 additions & 1 deletion python/context_selector/context_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# agreement to the Shotgun Pipeline Toolkit Source Code License. All rights
# not expressly granted therein are reserved by Shotgun Software Inc.

from functools import partial
import os
import sgtk
from sgtk.platform.qt import QtCore, QtGui
Expand Down Expand Up @@ -487,7 +488,12 @@ def _get_qaction_for_context(self, context):
action.setText(context_display)
action.setIcon(QtGui.QIcon(icon_path))
action.setData(context)
action.triggered.connect(lambda: self._on_context_activated(context))

def run_on_context_activated(context):
self._on_context_activated(context)

func = partial(run_on_context_activated, context)
action.triggered.connect(func)

return action

Expand Down
2 changes: 1 addition & 1 deletion python/search_completer/global_search_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def _handle_search_results(self, data):

item.setData(shotgun_model.sanitize_for_qt_model(d), self.SG_DATA_ROLE)

item.setIcon(self._pixmaps.no_thumbnail)
item.setIcon(QtGui.QIcon(self._pixmaps.no_thumbnail))

if d.get("image") and self._sg_data_retriever:
uid = self._sg_data_retriever.request_thumbnail(
Expand Down