mirror of
https://github.com/gnuradio/gnuradio-companion.git
synced 2025-12-10 15:57:35 -06:00
grc: don't blacklist default fg id
Signed-off-by: Josh Morman <jmorman@gnuradio.org>
This commit is contained in:
parent
f28db3236d
commit
d61a0258aa
@ -20,6 +20,7 @@ DATA_DIR = os.path.dirname(__file__)
|
||||
BLOCK_DTD = os.path.join(DATA_DIR, 'block.dtd')
|
||||
DEFAULT_FLOW_GRAPH = os.path.join(DATA_DIR, 'default_flow_graph.grc')
|
||||
DEFAULT_HIER_BLOCK_LIB_DIR = os.path.expanduser('~/.grc_gnuradio')
|
||||
DEFAULT_FLOW_GRAPH_ID = 'default'
|
||||
|
||||
CACHE_FILE = os.path.expanduser('~/.cache/grc_gnuradio/cache_v2.json')
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ from .. import Constants
|
||||
|
||||
|
||||
# Blacklist certain ids, its not complete, but should help
|
||||
ID_BLACKLIST = ['self', 'default'] + dir(builtins)
|
||||
ID_BLACKLIST = ['self'] + dir(builtins)
|
||||
try:
|
||||
from gnuradio import gr
|
||||
ID_BLACKLIST.extend(attr for attr in dir(
|
||||
|
||||
@ -660,7 +660,7 @@ class Application(Gtk.Application):
|
||||
file_path = FileDialogs.SaveFlowGraph(main, page.file_path).run()
|
||||
|
||||
if file_path is not None:
|
||||
if flow_graph.options_block.params['id'].get_value() == 'default':
|
||||
if flow_graph.options_block.params['id'].get_value() == Constants.DEFAULT_FLOW_GRAPH_ID:
|
||||
file_name = os.path.basename(file_path).replace(".grc", "")
|
||||
flow_graph.options_block.params['id'].set_value(file_name)
|
||||
flow_graph_update(flow_graph)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user