Skip to content

Commit

Permalink
grc-qt: Implement open hier source
Browse files Browse the repository at this point in the history
Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
  • Loading branch information
dl1ksv authored and willcode committed Aug 27, 2024
1 parent 0b96310 commit 30a0aa9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion grc/gui_qt/components/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ def createActions(self, actions):
actions["toggle_sink_bus"] = Action(_("toggle_sink_bus"), self)

actions["create_hier"].setEnabled(False)
actions["open_hier"].setEnabled(False)
actions["open_hier"].setEnabled(True)
actions["toggle_source_bus"].setEnabled(False)
actions["toggle_sink_bus"].setEnabled(False)

Expand Down Expand Up @@ -1432,6 +1432,13 @@ def reload_triggered(self):

self.updateActions()

def open_hier_triggered(self):
log.debug("Open hier block triggered")
for block in self.currentFlowgraphScene.selected_blocks():
grc_source = block.core.extra_data.get('grc_source', '')
if grc_source:
self.open_triggered(grc_source)

def rebuild_tab(self, idx):
fgscene = self.tabWidget.widget(idx).scene()
log.info("Rebuilding flowgraph ({0})".format(fgscene.filename))
Expand Down

0 comments on commit 30a0aa9

Please sign in to comment.