TileAtlasView Update zoom and panning before emitting signal
This commit is contained in:
parent
1d14c054a1
commit
4276752608
1 changed files with 2 additions and 2 deletions
|
@ -53,14 +53,14 @@ void TileAtlasView::_scroll_callback(Vector2 p_scroll_vec, bool p_alt) {
|
||||||
|
|
||||||
void TileAtlasView::_pan_callback(Vector2 p_scroll_vec) {
|
void TileAtlasView::_pan_callback(Vector2 p_scroll_vec) {
|
||||||
panning += p_scroll_vec;
|
panning += p_scroll_vec;
|
||||||
emit_signal(SNAME("transform_changed"), zoom_widget->get_zoom(), panning);
|
|
||||||
_update_zoom_and_panning(true);
|
_update_zoom_and_panning(true);
|
||||||
|
emit_signal(SNAME("transform_changed"), zoom_widget->get_zoom(), panning);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TileAtlasView::_zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt) {
|
void TileAtlasView::_zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt) {
|
||||||
zoom_widget->set_zoom_by_increments(-p_scroll_vec.y * 2);
|
zoom_widget->set_zoom_by_increments(-p_scroll_vec.y * 2);
|
||||||
emit_signal(SNAME("transform_changed"), zoom_widget->get_zoom(), panning);
|
|
||||||
_update_zoom_and_panning(true);
|
_update_zoom_and_panning(true);
|
||||||
|
emit_signal(SNAME("transform_changed"), zoom_widget->get_zoom(), panning);
|
||||||
}
|
}
|
||||||
|
|
||||||
Size2i TileAtlasView::_compute_base_tiles_control_size() {
|
Size2i TileAtlasView::_compute_base_tiles_control_size() {
|
||||||
|
|
Loading…
Reference in a new issue