summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/code_edit.cpp2
-rw-r--r--scene/gui/rich_text_label.cpp28
-rw-r--r--scene/gui/rich_text_label.h1
-rw-r--r--scene/gui/tab_bar.cpp2
-rw-r--r--scene/main/window.cpp6
-rw-r--r--scene/resources/mesh.cpp3
6 files changed, 7 insertions, 35 deletions
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp
index b084cb5bea..e2f7ec860c 100644
--- a/scene/gui/code_edit.cpp
+++ b/scene/gui/code_edit.cpp
@@ -2856,7 +2856,7 @@ void CodeEdit::_filter_code_completion_candidates_impl() {
const int caret_line = get_caret_line();
const int caret_column = get_caret_column();
const String line = get_line(caret_line);
- ERR_FAIL_INDEX_MSG(caret_column - 1, line.length(), "Caret column exceeds line length.");
+ ERR_FAIL_INDEX_MSG(caret_column, line.length() + 1, "Caret column exceeds line length.");
if (caret_column > 0 && line[caret_column - 1] == '(' && !code_completion_forced) {
cancel_code_completion();
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index f9c9906efa..2c1c44322a 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -5520,34 +5520,6 @@ void RichTextLabel::_bind_methods() {
BIND_ENUM_CONSTANT(LIST_ROMAN);
BIND_ENUM_CONSTANT(LIST_DOTS);
- BIND_ENUM_CONSTANT(ITEM_FRAME);
- BIND_ENUM_CONSTANT(ITEM_TEXT);
- BIND_ENUM_CONSTANT(ITEM_IMAGE);
- BIND_ENUM_CONSTANT(ITEM_NEWLINE);
- BIND_ENUM_CONSTANT(ITEM_FONT);
- BIND_ENUM_CONSTANT(ITEM_FONT_SIZE);
- BIND_ENUM_CONSTANT(ITEM_FONT_FEATURES);
- BIND_ENUM_CONSTANT(ITEM_COLOR);
- BIND_ENUM_CONSTANT(ITEM_OUTLINE_SIZE);
- BIND_ENUM_CONSTANT(ITEM_OUTLINE_COLOR);
- BIND_ENUM_CONSTANT(ITEM_UNDERLINE);
- BIND_ENUM_CONSTANT(ITEM_STRIKETHROUGH);
- BIND_ENUM_CONSTANT(ITEM_PARAGRAPH);
- BIND_ENUM_CONSTANT(ITEM_INDENT);
- BIND_ENUM_CONSTANT(ITEM_LIST);
- BIND_ENUM_CONSTANT(ITEM_TABLE);
- BIND_ENUM_CONSTANT(ITEM_FADE);
- BIND_ENUM_CONSTANT(ITEM_SHAKE);
- BIND_ENUM_CONSTANT(ITEM_WAVE);
- BIND_ENUM_CONSTANT(ITEM_TORNADO);
- BIND_ENUM_CONSTANT(ITEM_RAINBOW);
- BIND_ENUM_CONSTANT(ITEM_BGCOLOR);
- BIND_ENUM_CONSTANT(ITEM_FGCOLOR);
- BIND_ENUM_CONSTANT(ITEM_META);
- BIND_ENUM_CONSTANT(ITEM_HINT);
- BIND_ENUM_CONSTANT(ITEM_DROPCAP);
- BIND_ENUM_CONSTANT(ITEM_CUSTOMFX);
-
BIND_ENUM_CONSTANT(MENU_COPY);
BIND_ENUM_CONSTANT(MENU_SELECT_ALL);
BIND_ENUM_CONSTANT(MENU_MAX);
diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h
index b01fccf14c..1dae8b75ca 100644
--- a/scene/gui/rich_text_label.h
+++ b/scene/gui/rich_text_label.h
@@ -740,7 +740,6 @@ public:
};
VARIANT_ENUM_CAST(RichTextLabel::ListType);
-VARIANT_ENUM_CAST(RichTextLabel::ItemType);
VARIANT_ENUM_CAST(RichTextLabel::MenuItems);
#endif // RICH_TEXT_LABEL_H
diff --git a/scene/gui/tab_bar.cpp b/scene/gui/tab_bar.cpp
index eca6cb3eef..5e378a0321 100644
--- a/scene/gui/tab_bar.cpp
+++ b/scene/gui/tab_bar.cpp
@@ -342,6 +342,8 @@ void TabBar::_notification(int p_what) {
_shape(i);
}
+ queue_redraw();
+
[[fallthrough]];
}
case NOTIFICATION_RESIZED: {
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 6fbf6ccb81..b79a9ba444 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -984,17 +984,13 @@ void Window::_update_viewport_size() {
Size2 margin;
Size2 offset;
- //black bars and margin
+
if (content_scale_aspect != CONTENT_SCALE_ASPECT_EXPAND && screen_size.x < video_mode.x) {
margin.x = Math::round((video_mode.x - screen_size.x) / 2.0);
- //RenderingServer::get_singleton()->black_bars_set_margins(margin.x, 0, margin.x, 0);
offset.x = Math::round(margin.x * viewport_size.y / screen_size.y);
} else if (content_scale_aspect != CONTENT_SCALE_ASPECT_EXPAND && screen_size.y < video_mode.y) {
margin.y = Math::round((video_mode.y - screen_size.y) / 2.0);
- //RenderingServer::get_singleton()->black_bars_set_margins(0, margin.y, 0, margin.y);
offset.y = Math::round(margin.y * viewport_size.x / screen_size.x);
- } else {
- //RenderingServer::get_singleton()->black_bars_set_margins(0, 0, 0, 0);
}
switch (content_scale_mode) {
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index cf9baa2907..a7b53244e2 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -526,6 +526,9 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const {
vc = indices.size();
ir = indices.ptrw();
has_indices = true;
+ } else {
+ // Ensure there are enough vertices to construct at least one triangle.
+ ERR_FAIL_COND_V(vertices.size() % 3 != 0, Ref<ArrayMesh>());
}
HashMap<Vector3, Vector3> normal_accum;