summaryrefslogtreecommitdiff
path: root/grc/gui
diff options
context:
space:
mode:
authorJacob Gilbert <mrjacobagilbert@gmail.com>2020-11-11 15:43:43 -0800
committermormj <34754695+mormj@users.noreply.github.com>2020-12-17 08:42:20 -0500
commit1fbf9ba89c643f478024d6af797e0a0dbbdf5ba3 (patch)
tree044b8182a6a2a8e042ae305f5564998f1b98a2f9 /grc/gui
parent4f3b31a3700b02baf35e5eb95485e6a64933f6b7 (diff)
grc: restore pre-3.8 block id behavior
Prior to 3.8 block IDs were shown in the properties dialogue for every block as these are important for function of some GR features. #2795 brought this back as an option for 3.8+, however it forces the 'hide' value to effectively be 'none' instead of 'part' (not visible on the block canvas but visible in the properties dialogue) for all blocks. This changes this back to the pre-3.8 behavior where the ID value is not shown on the canvas but is shown in the properties dialogue.
Diffstat (limited to 'grc/gui')
-rw-r--r--grc/gui/PropsDialog.py2
-rw-r--r--grc/gui/canvas/block.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/grc/gui/PropsDialog.py b/grc/gui/PropsDialog.py
index e7dd72edcf..d8479d6061 100644
--- a/grc/gui/PropsDialog.py
+++ b/grc/gui/PropsDialog.py
@@ -175,7 +175,7 @@ class PropsDialog(Gtk.Dialog):
for param in self._block.params.values():
if force_show_id and param.dtype == 'id':
- param.hide = 'none'
+ param.hide = 'part'
# todo: why do we even rebuild instead of really hiding params?
if param.category != category or param.hide == 'all':
continue
diff --git a/grc/gui/canvas/block.py b/grc/gui/canvas/block.py
index 3b8f479413..4d1f962a6e 100644
--- a/grc/gui/canvas/block.py
+++ b/grc/gui/canvas/block.py
@@ -157,8 +157,8 @@ class Block(CoreBlock, Drawable):
# update the params layout
if not self.is_dummy_block:
- markups = [param.format_block_surface_markup()
- for param in self.params.values() if (param.hide not in ('all', 'part') or (param.dtype == 'id' and force_show_id))]
+ markups = [param.format_block_surface_markup() for param in self.params.values()
+ if (param.hide not in ('all', 'part'))]
else:
markups = ['<span font_desc="{font}"><b>key: </b>{key}</span>'.format(font=PARAM_FONT, key=self.key)]