diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/connections_dialog.cpp | 3 | ||||
-rw-r--r-- | editor/editor_properties.cpp | 13 | ||||
-rw-r--r-- | editor/editor_properties.h | 4 | ||||
-rw-r--r-- | editor/filesystem_dock.cpp | 1 | ||||
-rw-r--r-- | editor/icons/icon_audio_stream_o_g_g_vorbis.svg | 1 | ||||
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.cpp | 4 |
6 files changed, 18 insertions, 8 deletions
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index 60058f2f43..ec40b3254f 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -127,6 +127,7 @@ void ConnectDialog::ok_pressed() { } } emit_signal("connected"); + hide(); } void ConnectDialog::_cancel_pressed() { @@ -280,6 +281,8 @@ bool ConnectDialog::is_editing() const { */ void ConnectDialog::init(Connection c, bool bEdit) { + set_hide_on_ok(false); + source = static_cast<Node *>(c.source); signal = c.signal; diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index c049096c35..c134786b89 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -805,10 +805,10 @@ EditorPropertyLayers::EditorPropertyLayers() { ///////////////////// INT ///////////////////////// -void EditorPropertyInteger::_value_changed(double val) { +void EditorPropertyInteger::_value_changed(int64_t val) { if (setting) return; - emit_changed(get_edited_property(), (int64_t)val); + emit_changed(get_edited_property(), val); } void EditorPropertyInteger::update_property() { @@ -816,14 +816,19 @@ void EditorPropertyInteger::update_property() { setting = true; spin->set_value(val); setting = false; +#ifdef DEBUG_ENABLED + // If spin (currently EditorSplinSlider : Range) is changed so that it can use int64_t, then the below warning wouldn't be a problem. + if (val != (int64_t)(double)(val)) { + WARN_PRINT("Cannot reliably represent '" + itos(val) + "' in the inspector, value is too large."); + } +#endif } void EditorPropertyInteger::_bind_methods() { - ClassDB::bind_method(D_METHOD("_value_changed"), &EditorPropertyInteger::_value_changed); } -void EditorPropertyInteger::setup(int p_min, int p_max, int p_step, bool p_allow_greater, bool p_allow_lesser) { +void EditorPropertyInteger::setup(int64_t p_min, int64_t p_max, int64_t p_step, bool p_allow_greater, bool p_allow_lesser) { spin->set_min(p_min); spin->set_max(p_max); spin->set_step(p_step); diff --git a/editor/editor_properties.h b/editor/editor_properties.h index 4c7358597e..1853a6b6e1 100644 --- a/editor/editor_properties.h +++ b/editor/editor_properties.h @@ -263,14 +263,14 @@ class EditorPropertyInteger : public EditorProperty { GDCLASS(EditorPropertyInteger, EditorProperty); EditorSpinSlider *spin; bool setting; - void _value_changed(double p_val); + void _value_changed(int64_t p_val); protected: static void _bind_methods(); public: virtual void update_property(); - void setup(int p_min, int p_max, int p_step, bool p_allow_greater, bool p_allow_lesser); + void setup(int64_t p_min, int64_t p_max, int64_t p_step, bool p_allow_greater, bool p_allow_lesser); EditorPropertyInteger(); }; diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 93e9cc58fb..62effb406d 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -140,6 +140,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory subdirectory_item->set_collapsed(false); } else if (dname != "res://") { subdirectory_item->get_parent()->remove_child(subdirectory_item); + memdelete(subdirectory_item); } } diff --git a/editor/icons/icon_audio_stream_o_g_g_vorbis.svg b/editor/icons/icon_audio_stream_o_g_g_vorbis.svg new file mode 100644 index 0000000000..a8d6fb6bf1 --- /dev/null +++ b/editor/icons/icon_audio_stream_o_g_g_vorbis.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="8" x2="8" y1="1" y2="15"><stop offset="0" stop-color="#ff7a7a"/><stop offset=".5" stop-color="#e1dc7a"/><stop offset="1" stop-color="#66ff9e"/></linearGradient><path d="m11.971 1.002c-.08326.00207-.16593.014541-.24609.037109l-7 2c-.42881.12287-.7244.51487-.72461.96094v5.5508c-.16454-.033679-.33205-.050692-.5-.050781-1.3807 0-2.5 1.1193-2.5 2.5-.00000475 1.3807 1.1193 2.5 2.5 2.5 1.3456-.0013 2.4488-1.0674 2.4961-2.4121.0025906-.029226.003894-.058551.0039062-.087891v-7.2441l5-1.4277v3.1719l2-1v-3.5c-.000916-.56314-.4664-1.0145-1.0293-.99805zm-1.4707 6.998c-.277 0-.5.223-.5.5v5c0 .277.223.5.5.5s.5-.223.5-.5v-5c0-.277-.223-.5-.5-.5zm2 1c-.277 0-.5.223-.5.5v3c0 .277.223.5.5.5s.5-.223.5-.5v-3c0-.277-.223-.5-.5-.5zm-4 1c-.277 0-.5.223-.5.5v1c0 .277.223.5.5.5s.5-.223.5-.5v-1c0-.277-.223-.5-.5-.5zm6 0c-.277 0-.5.223-.5.5v1c0 .277.223.5.5.5s.5-.223.5-.5v-1c0-.277-.223-.5-.5-.5z" fill="url(#a)"/></svg>
\ No newline at end of file diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index 5d73ffa209..bdef108ef2 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -726,9 +726,9 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PoolByt uint8_t jpg_signature[3] = { 255, 216, 255 }; if (r.ptr()) { - if (memcmp(&r[0], &png_signature[0], 8) == 0) { + if ((memcmp(&r[0], &png_signature[0], 8) == 0) && Image::_png_mem_loader_func) { image->copy_internals_from(Image::_png_mem_loader_func(r.ptr(), len)); - } else if (memcmp(&r[0], &jpg_signature[0], 3) == 0) { + } else if ((memcmp(&r[0], &jpg_signature[0], 3) == 0) && Image::_jpg_mem_loader_func) { image->copy_internals_from(Image::_jpg_mem_loader_func(r.ptr(), len)); } } |