summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/editor_toaster.cpp8
-rw-r--r--editor/editor_toaster.h2
-rw-r--r--editor/plugins/skeleton_3d_editor_plugin.cpp27
-rw-r--r--scene/gui/base_button.cpp4
-rw-r--r--scene/gui/base_button.h2
-rw-r--r--scene/gui/menu_button.cpp2
-rw-r--r--scene/gui/rich_text_label.cpp4
-rw-r--r--scene/register_scene_types.cpp10
8 files changed, 42 insertions, 17 deletions
diff --git a/editor/editor_toaster.cpp b/editor/editor_toaster.cpp
index 319b4709fe..7ca88bd2a2 100644
--- a/editor/editor_toaster.cpp
+++ b/editor/editor_toaster.cpp
@@ -385,12 +385,19 @@ Control *EditorToaster::popup(Control *p_control, Severity p_severity, double p_
}
void EditorToaster::popup_str(String p_message, Severity p_severity, String p_tooltip) {
+ if (is_processing_error) {
+ return;
+ }
+
// Since "_popup_str" adds nodes to the tree, and since the "add_child" method is not
// thread-safe, it's better to defer the call to the next cycle to be thread-safe.
+ is_processing_error = true;
call_deferred(SNAME("_popup_str"), p_message, p_severity, p_tooltip);
+ is_processing_error = false;
}
void EditorToaster::_popup_str(String p_message, Severity p_severity, String p_tooltip) {
+ is_processing_error = true;
// Check if we already have a popup with the given message.
Control *control = nullptr;
for (KeyValue<Control *, Toast> element : toasts) {
@@ -432,6 +439,7 @@ void EditorToaster::_popup_str(String p_message, Severity p_severity, String p_t
} else {
label->set_text(vformat("%s (%d)", p_message, toasts[control].count));
}
+ is_processing_error = false;
}
void EditorToaster::close(Control *p_control) {
diff --git a/editor/editor_toaster.h b/editor/editor_toaster.h
index 2ad8752bee..059245ce66 100644
--- a/editor/editor_toaster.h
+++ b/editor/editor_toaster.h
@@ -82,6 +82,8 @@ private:
};
Map<Control *, Toast> toasts;
+ bool is_processing_error = false; // Makes sure that we don't handle errors that are triggered within the EditorToaster error processing.
+
const double default_message_duration = 5.0;
static void _error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, bool p_editor_notify, ErrorHandlerType p_type);
diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp
index aec1a09e48..aadc7a2e66 100644
--- a/editor/plugins/skeleton_3d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_3d_editor_plugin.cpp
@@ -528,22 +528,25 @@ void Skeleton3DEditor::move_skeleton_bone(NodePath p_skeleton_path, int32_t p_se
void Skeleton3DEditor::_joint_tree_selection_changed() {
TreeItem *selected = joint_tree->get_selected();
- if (!selected) {
- return;
- }
- const String path = selected->get_metadata(0);
- if (!path.begins_with("bones/")) {
- return;
+ if (selected) {
+ const String path = selected->get_metadata(0);
+ if (!path.begins_with("bones/")) {
+ return;
+ }
+ const int b_idx = path.get_slicec('/', 1).to_int();
+ selected_bone = b_idx;
+ if (pose_editor) {
+ const String bone_path = "bones/" + itos(b_idx) + "/";
+ pose_editor->set_target(bone_path);
+ pose_editor->set_keyable(keyable);
+ }
}
- const int b_idx = path.get_slicec('/', 1).to_int();
- selected_bone = b_idx;
- if (pose_editor) {
- const String bone_path = "bones/" + itos(b_idx) + "/";
- pose_editor->set_target(bone_path);
- pose_editor->set_keyable(keyable);
+
+ if (pose_editor && pose_editor->is_inside_tree()) {
pose_editor->set_visible(selected);
}
set_bone_options_enabled(selected);
+
_update_properties();
_update_gizmo_visible();
}
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index 0338326bbe..ab86face7e 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -349,7 +349,7 @@ Ref<Shortcut> BaseButton::get_shortcut() const {
void BaseButton::unhandled_key_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
- if (!_is_focus_owner_in_shorcut_context()) {
+ if (!_is_focus_owner_in_shortcut_context()) {
return;
}
@@ -404,7 +404,7 @@ Node *BaseButton::get_shortcut_context() const {
return ctx_node;
}
-bool BaseButton::_is_focus_owner_in_shorcut_context() const {
+bool BaseButton::_is_focus_owner_in_shortcut_context() const {
if (shortcut_context == ObjectID()) {
// No context, therefore global - always "in" context.
return true;
diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h
index 6bfffe7575..a2b6ee0845 100644
--- a/scene/gui/base_button.h
+++ b/scene/gui/base_button.h
@@ -80,7 +80,7 @@ protected:
virtual void unhandled_key_input(const Ref<InputEvent> &p_event) override;
void _notification(int p_what);
- bool _is_focus_owner_in_shorcut_context() const;
+ bool _is_focus_owner_in_shortcut_context() const;
GDVIRTUAL0(_pressed)
GDVIRTUAL1(_toggled, bool)
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp
index c04690cdb3..7e724e4d71 100644
--- a/scene/gui/menu_button.cpp
+++ b/scene/gui/menu_button.cpp
@@ -36,7 +36,7 @@
void MenuButton::unhandled_key_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
- if (!_is_focus_owner_in_shorcut_context()) {
+ if (!_is_focus_owner_in_shortcut_context()) {
return;
}
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 1c9eb14a24..bad7be7d42 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -3250,6 +3250,10 @@ void RichTextLabel::append_text(const String &p_bbcode) {
push_paragraph(HORIZONTAL_ALIGNMENT_FILL);
pos = brk_end + 1;
tag_stack.push_front(tag);
+ } else if (tag == "left") {
+ push_paragraph(HORIZONTAL_ALIGNMENT_LEFT);
+ pos = brk_end + 1;
+ tag_stack.push_front(tag);
} else if (tag == "right") {
push_paragraph(HORIZONTAL_ALIGNMENT_RIGHT);
pos = brk_end + 1;
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index 0b66ff004b..a396ef01f4 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -1016,7 +1016,7 @@ void register_scene_types() {
ClassDB::add_compatibility_class("SpringArm", "SpringArm3D");
ClassDB::add_compatibility_class("Sprite", "Sprite2D");
ClassDB::add_compatibility_class("StaticBody", "StaticBody3D");
- ClassDB::add_compatibility_class("CompressedTexture", "CompressedTexture2D");
+ ClassDB::add_compatibility_class("StreamTexture", "CompressedTexture2D");
ClassDB::add_compatibility_class("TextureProgress", "TextureProgressBar");
ClassDB::add_compatibility_class("VehicleBody", "VehicleBody3D");
ClassDB::add_compatibility_class("VehicleWheel", "VehicleWheel3D");
@@ -1046,6 +1046,14 @@ void register_scene_types() {
ClassDB::add_compatibility_class("VisualShaderNodeScalarDerivativeFunc", "VisualShaderNodeDerivativeFunc");
ClassDB::add_compatibility_class("VisualShaderNodeVectorDerivativeFunc", "VisualShaderNodeDerivativeFunc");
ClassDB::add_compatibility_class("World", "World3D");
+
+ // Renamed during 4.0 alpha, added to ease transition between alphas.
+ ClassDB::add_compatibility_class("StreamCubemap", "CompressedCubemap");
+ ClassDB::add_compatibility_class("StreamCubemapArray", "CompressedCubemapArray");
+ ClassDB::add_compatibility_class("StreamTexture2D", "CompressedTexture2D");
+ ClassDB::add_compatibility_class("StreamTexture2DArray", "CompressedTexture2DArray");
+ ClassDB::add_compatibility_class("StreamTexture3D", "CompressedTexture3D");
+ ClassDB::add_compatibility_class("StreamTextureLayered", "CompressedTextureLayered");
#endif /* DISABLE_DEPRECATED */
OS::get_singleton()->yield(); // may take time to init