summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/find_in_files.cpp4
-rw-r--r--editor/node_dock.cpp2
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp2
3 files changed, 5 insertions, 3 deletions
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp
index 86a4a9ef47..4ab90ad3e4 100644
--- a/editor/find_in_files.cpp
+++ b/editor/find_in_files.cpp
@@ -828,8 +828,8 @@ void FindInFilesPanel::apply_replaces_in_file(String fpath, const Vector<Result>
// If there are unsaved changes, the user will be asked on focus,
// however that means either losing changes or losing replaces.
- FileAccess *f = FileAccess::open(fpath, FileAccess::READ);
- ERR_FAIL_COND_MSG(f == NULL, "Cannot open file from path '" + fpath + "'.");
+ FileAccessRef f = FileAccess::open(fpath, FileAccess::READ);
+ ERR_FAIL_COND_MSG(!f, "Cannot open file from path '" + fpath + "'.");
String buffer;
int current_line = 1;
diff --git a/editor/node_dock.cpp b/editor/node_dock.cpp
index 20b8b3f5cb..c53c5f330b 100644
--- a/editor/node_dock.cpp
+++ b/editor/node_dock.cpp
@@ -105,6 +105,7 @@ NodeDock::NodeDock() {
connections_button->set_toggle_mode(true);
connections_button->set_pressed(true);
connections_button->set_h_size_flags(SIZE_EXPAND_FILL);
+ connections_button->set_clip_text(true);
mode_hb->add_child(connections_button);
connections_button->connect("pressed", this, "show_connections");
@@ -113,6 +114,7 @@ NodeDock::NodeDock() {
groups_button->set_toggle_mode(true);
groups_button->set_pressed(false);
groups_button->set_h_size_flags(SIZE_EXPAND_FILL);
+ groups_button->set_clip_text(true);
mode_hb->add_child(groups_button);
groups_button->connect("pressed", this, "show_groups");
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index c1f62e8342..4f73a5eaea 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -162,7 +162,7 @@ void EditorAssetLibraryItemDescription::set_image(int p_type, int p_index, const
Ref<Image> overlay = get_icon("PlayOverlay", "EditorIcons")->get_data();
Ref<Image> thumbnail = p_image->get_data();
thumbnail = thumbnail->duplicate();
- Point2 overlay_pos = Point2((thumbnail->get_width() - overlay->get_width() / 2) / 2, (thumbnail->get_height() - overlay->get_height() / 2) / 2);
+ Point2 overlay_pos = Point2((thumbnail->get_width() - overlay->get_width()) / 2, (thumbnail->get_height() - overlay->get_height()) / 2);
// Overlay and thumbnail need the same format for `blend_rect` to work.
thumbnail->convert(Image::FORMAT_RGBA8);