mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-21 21:41:02 +00:00
Center on zoom (fixed issue #385)
This commit is contained in:
parent
4c706afb90
commit
223988d7ff
@ -1125,7 +1125,7 @@ void Editor::setZoomAndCenterInMouse(int zoom, int mouse_x, int mouse_y)
|
|||||||
View* view = View::getView(this);
|
View* view = View::getView(this);
|
||||||
Rect vp = view->getViewportBounds();
|
Rect vp = view->getViewportBounds();
|
||||||
int x, y;
|
int x, y;
|
||||||
bool centerMouse = get_config_bool("Editor", "CenterMouseInZoom", false);
|
bool centerMouse = get_config_bool("Editor", "CenterMouseInZoom", true);
|
||||||
int mx, my;
|
int mx, my;
|
||||||
|
|
||||||
hideDrawingCursor();
|
hideDrawingCursor();
|
||||||
@ -1153,9 +1153,6 @@ void Editor::setZoomAndCenterInMouse(int zoom, int mouse_x, int mouse_y)
|
|||||||
updateEditor();
|
updateEditor();
|
||||||
setEditorScroll(x, y, use_refresh_region);
|
setEditorScroll(x, y, use_refresh_region);
|
||||||
|
|
||||||
if (centerMouse)
|
|
||||||
ui::set_mouse_position(gfx::Point(mx, my));
|
|
||||||
|
|
||||||
// Notify observers
|
// Notify observers
|
||||||
m_observers.notifyScrollChanged(this);
|
m_observers.notifyScrollChanged(this);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user