summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-02-01 07:43:05 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-02-01 07:43:05 +0100
commita5be03e59a82de61b8c65e60719ca5b58a10db37 (patch)
tree1626545e048045e210447fc2480c8db3d7317575
parent64f0dad2dcb3b4332c7c4c17c8ca31fb5628618c (diff)
parent8f21f637e200420cb4809e467b3be3f27c36c971 (diff)
Merge pull request #72476 from TokageItLab/graph-signal
Fix `scroll_offset_changed` signal doesn't fired when panning `GraphEdit`
-rw-r--r--scene/gui/graph_edit.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index dc23bcb14a..fe2eed6755 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -264,10 +264,6 @@ void GraphEdit::_scroll_moved(double) {
top_layer->queue_redraw();
minimap->queue_redraw();
queue_redraw();
-
- if (!setting_scroll_ofs) { //in godot, signals on change value are avoided as a convention
- emit_signal(SNAME("scroll_offset_changed"), get_scroll_ofs());
- }
}
void GraphEdit::_update_scroll_offset() {
@@ -290,6 +286,10 @@ void GraphEdit::_update_scroll_offset() {
connections_layer->set_position(-Point2(h_scroll->get_value(), v_scroll->get_value()));
set_block_minimum_size_adjust(false);
awaiting_scroll_offset_update = false;
+
+ if (!setting_scroll_ofs) { //in godot, signals on change value are avoided as a convention
+ emit_signal(SNAME("scroll_offset_changed"), get_scroll_ofs());
+ }
}
void GraphEdit::_update_scroll() {