mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
add temporary null handling to variable viewer
This commit is contained in:
parent
ca18e36fdc
commit
3378f41b75
1 changed files with 8 additions and 1 deletions
|
@ -130,7 +130,14 @@ func add_item(item_name: String, item_value: Variant, parent: TreeItem = root, c
|
||||||
var item := variable_tree.create_item(parent)
|
var item := variable_tree.create_item(parent)
|
||||||
item.set_text(0, item_name)
|
item.set_text(0, item_name)
|
||||||
|
|
||||||
var type: DeckType.Types = DeckType.INVERSE_GODOT_TYPES_MAP[typeof(item_value)]
|
# TODO: proper null handling
|
||||||
|
var value_type := typeof(item_value)
|
||||||
|
var type: DeckType.Types
|
||||||
|
if value_type == TYPE_NIL:
|
||||||
|
type = DeckType.Types.STRING
|
||||||
|
item_value = "<nothing>"
|
||||||
|
else:
|
||||||
|
type = DeckType.INVERSE_GODOT_TYPES_MAP[typeof(item_value)]
|
||||||
item.set_meta(&"container", container)
|
item.set_meta(&"container", container)
|
||||||
item.set_meta(&"indexed", indexed)
|
item.set_meta(&"indexed", indexed)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue