summaryrefslogtreecommitdiff
path: root/python/examples/triage/exports.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/examples/triage/exports.py')
-rw-r--r--python/examples/triage/exports.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/python/examples/triage/exports.py b/python/examples/triage/exports.py
index 14b23969..c72baa19 100644
--- a/python/examples/triage/exports.py
+++ b/python/examples/triage/exports.py
@@ -2,7 +2,7 @@ from PySide2.QtWidgets import QTreeView, QVBoxLayout, QWidget
from PySide2.QtCore import Qt, QAbstractItemModel, QModelIndex, QSize
from binaryninja.enums import SymbolType, SymbolBinding
import binaryninjaui
-from binaryninjaui import ViewFrame, FilterTarget, FilteredView, UIContext
+from binaryninjaui import ViewFrame, FilterTarget, FilteredView, UIContext, UIActionHandler
class GenericExportsModel(QAbstractItemModel):
@@ -112,6 +112,11 @@ class ExportsTreeView(QTreeView, FilterTarget):
self.parent = parent
self.view = view
+ # Allow view-specific shortcuts when exports are focused
+ self.actionHandler = UIActionHandler()
+ self.actionHandler.setupActionHandler(self)
+ self.actionHandler.setActionContext(lambda: self.view.actionContext())
+
self.model = GenericExportsModel(self.data)
self.setModel(self.model)
self.setRootIsDecorated(False)