summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/tab_container.cpp8
-rw-r--r--scene/gui/tab_container.h2
-rw-r--r--scene/gui/text_edit.cpp6
-rw-r--r--scene/main/canvas_item.cpp4
-rw-r--r--scene/main/viewport.cpp4
-rw-r--r--scene/register_scene_types.cpp2
-rw-r--r--scene/resources/texture.cpp2
7 files changed, 14 insertions, 14 deletions
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index ab4808d312..9105267ad3 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -345,7 +345,7 @@ Vector<Control *> TabContainer::_get_tab_controls() const {
Vector<Control *> controls;
for (int i = 0; i < get_child_count(); i++) {
Control *control = Object::cast_to<Control>(get_child(i));
- if (!control || control->is_set_as_top_level() || control == tab_bar || control == child_removing) {
+ if (!control || control->is_set_as_top_level() || control == tab_bar || children_removing.has(control)) {
continue;
}
@@ -584,10 +584,10 @@ void TabContainer::remove_child_notify(Node *p_child) {
int idx = get_tab_idx_from_control(c);
- // Before this, the tab control has not changed; after this, the tab control has changed.
- child_removing = p_child;
+ // As the child hasn't been removed yet, keep track of it so when the "tab_changed" signal is fired it can be ignored.
+ children_removing.push_back(c);
tab_bar->remove_tab(idx);
- child_removing = nullptr;
+ children_removing.erase(c);
_update_margins();
if (get_tab_count() == 0) {
diff --git a/scene/gui/tab_container.h b/scene/gui/tab_container.h
index b552aa459b..60961e02d3 100644
--- a/scene/gui/tab_container.h
+++ b/scene/gui/tab_container.h
@@ -46,7 +46,7 @@ class TabContainer : public Container {
bool drag_to_rearrange_enabled = false;
bool use_hidden_tabs_for_min_size = false;
bool theme_changing = false;
- Node *child_removing = nullptr;
+ Vector<Control *> children_removing;
struct ThemeCache {
int side_margin = 0;
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 324273bfa5..1b8444abf4 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -833,7 +833,7 @@ void TextEdit::_notification(int p_what) {
continue;
}
- // If we've changed colour we are at the start of a new section, therefore we need to go back to the end
+ // If we've changed color we are at the start of a new section, therefore we need to go back to the end
// of the previous section to draw it, we'll also add the character back on.
if (color != previous_color) {
characters--;
@@ -2659,7 +2659,7 @@ void TextEdit::_do_backspace(bool p_word, bool p_all_to_left) {
set_caret_line(get_caret_line(caret_idx), false, true, 0, caret_idx);
set_caret_column(column, caret_idx == 0, caret_idx);
- // Now we can clean up the overlaping caret.
+ // Now we can clean up the overlapping caret.
if (overlapping_caret_index != -1) {
backspace(overlapping_caret_index);
i++;
@@ -6560,7 +6560,7 @@ void TextEdit::_cut_internal(int p_caret) {
int indent_level = get_indent_level(cl);
double hscroll = get_h_scroll();
- // Check for overlaping carets.
+ // Check for overlapping carets.
// We don't need to worry about selections as that is caught before this entire section.
for (int j = i - 1; j >= 0; j--) {
if (get_caret_line(caret_edit_order[j]) == cl) {
diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp
index 3bf4e95e68..7bcd4721fc 100644
--- a/scene/main/canvas_item.cpp
+++ b/scene/main/canvas_item.cpp
@@ -1112,7 +1112,7 @@ uint32_t CanvasItem::get_visibility_layer() const {
}
void CanvasItem::set_visibility_layer_bit(uint32_t p_visibility_layer, bool p_enable) {
- ERR_FAIL_INDEX(p_visibility_layer, 32);
+ ERR_FAIL_UNSIGNED_INDEX(p_visibility_layer, 32);
if (p_enable) {
set_visibility_layer(visibility_layer | (1 << p_visibility_layer));
} else {
@@ -1121,7 +1121,7 @@ void CanvasItem::set_visibility_layer_bit(uint32_t p_visibility_layer, bool p_en
}
bool CanvasItem::get_visibility_layer_bit(uint32_t p_visibility_layer) const {
- ERR_FAIL_INDEX_V(p_visibility_layer, 32, false);
+ ERR_FAIL_UNSIGNED_INDEX_V(p_visibility_layer, 32, false);
return (visibility_layer & (1 << p_visibility_layer));
}
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 2385e4f54a..f8b0a66a71 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -3255,7 +3255,7 @@ uint32_t Viewport::get_canvas_cull_mask() const {
}
void Viewport::set_canvas_cull_mask_bit(uint32_t p_layer, bool p_enable) {
- ERR_FAIL_INDEX(p_layer, 32);
+ ERR_FAIL_UNSIGNED_INDEX(p_layer, 32);
if (p_enable) {
set_canvas_cull_mask(canvas_cull_mask | (1 << p_layer));
} else {
@@ -3264,7 +3264,7 @@ void Viewport::set_canvas_cull_mask_bit(uint32_t p_layer, bool p_enable) {
}
bool Viewport::get_canvas_cull_mask_bit(uint32_t p_layer) const {
- ERR_FAIL_INDEX_V(p_layer, 32, false);
+ ERR_FAIL_UNSIGNED_INDEX_V(p_layer, 32, false);
return (canvas_cull_mask & (1 << p_layer));
}
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index e536aeee51..0f55c7b3b8 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -1184,7 +1184,7 @@ void unregister_scene_types() {
ResourceLoader::remove_resource_format_loader(resource_loader_shader_include);
resource_loader_shader_include.unref();
- // StandardMaterial3D is not initialised when 3D is disabled, so it shouldn't be cleaned up either
+ // StandardMaterial3D is not initialized when 3D is disabled, so it shouldn't be cleaned up either
#ifndef _3D_DISABLED
BaseMaterial3D::finish_shaders();
PhysicalSkyMaterial::cleanup_shader();
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 5232e8fcab..a6fb359051 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -1663,7 +1663,7 @@ Ref<Image> AtlasTexture::get_image() const {
return Ref<Image>();
}
- return atlas->get_image()->get_rect(region);
+ return atlas->get_image()->get_region(region);
}
AtlasTexture::AtlasTexture() {}