diff options
Diffstat (limited to 'grc/gui')
-rw-r--r-- | grc/gui/ActionHandler.py | 10 | ||||
-rw-r--r-- | grc/gui/Element.py | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py index 25c779b4d2..d188030c62 100644 --- a/grc/gui/ActionHandler.py +++ b/grc/gui/ActionHandler.py @@ -670,12 +670,14 @@ class ActionHandler: Actions.BLOCK_COPY.set_sensitive(bool(selected_blocks)) Actions.BLOCK_PASTE.set_sensitive(bool(self.clipboard)) #update enable/disable/bypass - can_enable = any(block.get_state() != Constants.BLOCK_ENABLED + can_enable = any(block.state != block.ENABLED for block in selected_blocks) - can_disable = any(block.get_state() != Constants.BLOCK_DISABLED + can_disable = any(block.state != block.DISABLED for block in selected_blocks) - can_bypass_all = all(block.can_bypass() for block in selected_blocks) \ - and any(not block.get_bypassed() for block in selected_blocks) + can_bypass_all = ( + all(block.can_bypass() for block in selected_blocks) and + any(not block.get_bypassed() for block in selected_blocks) + ) Actions.BLOCK_ENABLE.set_sensitive(can_enable) Actions.BLOCK_DISABLE.set_sensitive(can_disable) Actions.BLOCK_BYPASS.set_sensitive(can_bypass_all) diff --git a/grc/gui/Element.py b/grc/gui/Element.py index 4e88df375f..48fdf62543 100644 --- a/grc/gui/Element.py +++ b/grc/gui/Element.py @@ -48,7 +48,6 @@ class Element(object): 0, Gdk.LINE_SOLID, Gdk.CAP_BUTT, Gdk.JOIN_MITER ]""" - def is_horizontal(self, rotation=None): """ Is this element horizontal? |