From da5f4b2ba190dccabace9cd55da05d6886055aec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20St=C3=B6ckli?= Date: Sun, 6 Aug 2017 00:06:35 +0200 Subject: [PATCH] Prevent crash with invalid default types --- notes.txt | 21 --------------------- property_item.gd | 3 ++- 2 files changed, 2 insertions(+), 22 deletions(-) delete mode 100644 notes.txt diff --git a/notes.txt b/notes.txt deleted file mode 100644 index e60a1f9..0000000 --- a/notes.txt +++ /dev/null @@ -1,21 +0,0 @@ -Add "Notes" to each element -Add Display Name for each -Add Refresh -Check how to deal with reloading the tree -Add Sub categories -Translate -Add "state" handling -Add UndoRedo - -Move short callbacks from self to the object and call directly (e.g. popup) - -Use EditorFileSystem class to check for changes (external ones) - -print_progress - - -Handle when switching from encrypted to non-encrypted and vice versa - -# Progress? -get_status(story_item) -set_status(story_item, value) \ No newline at end of file diff --git a/property_item.gd b/property_item.gd index 21d27c4..0b945d3 100644 --- a/property_item.gd +++ b/property_item.gd @@ -204,7 +204,7 @@ func create_string(): for i in range(0, hint_array.size()): control.get_popup().add_item(hint_array[i]) control.set_flat(false) - control.set_text(value) + control.set_text(str(value)) control.get_popup().connect("item_pressed", self, "string_enum_property_value_changed", []) elif hint == PROPERTY_HINT_MULTILINE_TEXT: # RABRABRAB @@ -356,6 +356,7 @@ func get_custom_editor_value(index): else: return value.origin.z func create_object_or_image(): + value = str(value) control = HBoxContainer.new() object_type_line_edit = LineEdit.new() object_type_line_edit.set_text(str(value))