connect toggle for time diff plugin
This commit is contained in:
@@ -9,6 +9,7 @@ class RAction():
|
||||
def __init__(self,
|
||||
label: str,
|
||||
action: Callable[[], None] = None,
|
||||
after_action: Callable[[], None] = None,
|
||||
shortcut: str = None,
|
||||
icon_from_theme: str = None,
|
||||
icon_file: str = None,
|
||||
@@ -28,6 +29,7 @@ class RAction():
|
||||
super(RAction, self).__init__()
|
||||
self.label = label
|
||||
self.action = action
|
||||
self.after_action = after_action
|
||||
self.shortcut = shortcut
|
||||
self.icon_from_theme = icon_from_theme
|
||||
self.icon_file = icon_file
|
||||
@@ -82,6 +84,7 @@ class RAction():
|
||||
action.setShortcut(self.shortcut)
|
||||
if self.action:
|
||||
action.triggered.connect(self.action)
|
||||
action.triggered.connect(self.after_action)
|
||||
if self.checkable:
|
||||
self._update_check_state()
|
||||
|
||||
@@ -99,6 +102,7 @@ class RAction():
|
||||
button.setShortcut(self.shortcut)
|
||||
if self.action:
|
||||
button.pressed.connect(self.action)
|
||||
button.pressed.connect(self.after_action)
|
||||
if self.checkable:
|
||||
button.setChecked(self.checked)
|
||||
button.setCheckable(self.checkable)
|
||||
|
||||
Reference in New Issue
Block a user