mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
don't open deck tab if the deck is null (#160)
closes #98, but crucially doesn't add any real error checking in the actual deck loading code, instead just opting to refuse to open a tab for a deck that comes out null from DeckHolder. Reviewed-on: https://codeberg.org/StreamGraph/StreamGraph/pulls/160 Co-authored-by: Lera Elvoé <yagich@poto.cafe> Co-committed-by: Lera Elvoé <yagich@poto.cafe>
This commit is contained in:
parent
3a7facf948
commit
33425e8436
1 changed files with 3 additions and 0 deletions
|
@ -393,6 +393,9 @@ func open_deck_at_path(path: String) -> void:
|
|||
|
||||
func open_deck_from_dict(data: Dictionary, path: String) -> void:
|
||||
var deck := DeckHolder.open_deck_from_dict(data, path)
|
||||
if deck == null:
|
||||
DeckHolder.logger.toast_error("Error loading deck at path: %s" % path)
|
||||
return
|
||||
var inst: DeckRendererGraphEdit = DECK_SCENE.instantiate()
|
||||
inst.deck = deck
|
||||
var tab := tab_container.add_content(inst, path.get_file())
|
||||
|
|
Loading…
Reference in a new issue