summaryrefslogtreecommitdiff
path: root/editor/plugins/texture_region_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/texture_region_editor_plugin.cpp')
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index ce6bb4b91a..507ea0b83d 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -736,6 +736,9 @@ void TextureRegionEditor::_notification(int p_what) {
zoom_out->set_icon(get_icon("ZoomLess", "EditorIcons"));
zoom_reset->set_icon(get_icon("ZoomReset", "EditorIcons"));
zoom_in->set_icon(get_icon("ZoomMore", "EditorIcons"));
+
+ vscroll->set_anchors_and_margins_preset(PRESET_RIGHT_WIDE);
+ hscroll->set_anchors_and_margins_preset(PRESET_BOTTOM_WIDE);
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
if (snap_mode == SNAP_AUTOSLICE && is_visible() && autoslice_is_dirty) {
@@ -1022,12 +1025,10 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
vscroll = memnew(VScrollBar);
vscroll->set_step(0.001);
edit_draw->add_child(vscroll);
- vscroll->set_anchors_and_margins_preset(PRESET_RIGHT_WIDE);
vscroll->connect("value_changed", this, "_scroll_changed");
hscroll = memnew(HScrollBar);
hscroll->set_step(0.001);
edit_draw->add_child(hscroll);
- hscroll->set_anchors_and_margins_preset(PRESET_BOTTOM_WIDE);
hscroll->connect("value_changed", this, "_scroll_changed");
updating_scroll = false;