summaryrefslogtreecommitdiff
path: root/editor/editor_resource_preview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_resource_preview.cpp')
-rw-r--r--editor/editor_resource_preview.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp
index 33de63e63d..083b382521 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -71,20 +71,14 @@ Ref<Texture2D> EditorResourcePreviewGenerator::generate_from_path(const String &
bool EditorResourcePreviewGenerator::generate_small_preview_automatically() const {
bool success = false;
- if (GDVIRTUAL_CALL(_generate_small_preview_automatically, success)) {
- return success;
- }
-
- return false;
+ GDVIRTUAL_CALL(_generate_small_preview_automatically, success);
+ return success;
}
bool EditorResourcePreviewGenerator::can_generate_small_preview() const {
bool success = false;
- if (GDVIRTUAL_CALL(_can_generate_small_preview, success)) {
- return success;
- }
-
- return false;
+ GDVIRTUAL_CALL(_can_generate_small_preview, success);
+ return success;
}
void EditorResourcePreviewGenerator::_bind_methods() {
@@ -148,7 +142,7 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref<
return; //could not guess type
}
- int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
+ int thumbnail_size = EDITOR_GET("filesystem/file_dialog/thumbnail_size");
thumbnail_size *= EDSCALE;
r_texture = Ref<ImageTexture>();
@@ -232,7 +226,7 @@ void EditorResourcePreview::_iterate() {
Ref<ImageTexture> texture;
Ref<ImageTexture> small_texture;
- int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
+ int thumbnail_size = EDITOR_GET("filesystem/file_dialog/thumbnail_size");
thumbnail_size *= EDSCALE;
if (item.resource.is_valid()) {