Fix scroll_offset_changed signal doesn't fired when panning GraphEdit
This commit is contained in:
parent
0810ecaafd
commit
8f21f637e2
|
@ -264,10 +264,6 @@ void GraphEdit::_scroll_moved(double) {
|
||||||
top_layer->queue_redraw();
|
top_layer->queue_redraw();
|
||||||
minimap->queue_redraw();
|
minimap->queue_redraw();
|
||||||
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() {
|
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()));
|
connections_layer->set_position(-Point2(h_scroll->get_value(), v_scroll->get_value()));
|
||||||
set_block_minimum_size_adjust(false);
|
set_block_minimum_size_adjust(false);
|
||||||
awaiting_scroll_offset_update = 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() {
|
void GraphEdit::_update_scroll() {
|
||||||
|
|
Loading…
Reference in New Issue