summaryrefslogtreecommitdiff
path: root/editor/plugins/animation_state_machine_editor.cpp
diff options
context:
space:
mode:
authorGuilherme Felipe <guilhermefelipecgs@gmail.com>2019-01-06 12:35:12 -0200
committerGuilherme Felipe <guilhermefelipecgs@gmail.com>2019-01-06 12:35:12 -0200
commit59df3ca91170ce8d40adb9751efd47ff17ffb032 (patch)
treeb07adcaa41dd583fdcb8ee66731f63ee51c94c32 /editor/plugins/animation_state_machine_editor.cpp
parent53516d7a9ec7119b3a23e5fc3fd1c61dc1e3074c (diff)
Fix state machine scroll
Diffstat (limited to 'editor/plugins/animation_state_machine_editor.cpp')
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index 2a2f3ee635..431d63aefc 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -606,7 +606,7 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
state_machine->get_node_list(&nodes);
node_rects.clear();
- Rect2 scroll_range(Point2(), state_machine_draw->get_size());
+ Rect2 scroll_range;
//snap lines
if (dragging_selected) {
@@ -823,7 +823,8 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
}
}
- scroll_range = scroll_range.grow(200 * EDSCALE);
+ scroll_range.position -= state_machine_draw->get_size();
+ scroll_range.size += state_machine_draw->get_size() * 2.0;
//adjust scrollbars
updating = true;