forked from bartvdbraak/blender
re-commit temp workaround [#35920], this still fails for OSX retina display,
but at least it resolves for DPI values other then 72.
This commit is contained in:
parent
4c41ad2299
commit
8053b9a801
@ -66,8 +66,12 @@ class NodeAddOperator():
|
|||||||
|
|
||||||
# convert mouse position to the View2D for later node placement
|
# convert mouse position to the View2D for later node placement
|
||||||
if context.region.type == 'WINDOW':
|
if context.region.type == 'WINDOW':
|
||||||
|
# XXX, temp fix for [#35920], still fails for (U.pixelsize != 1)
|
||||||
|
dpi_fac = context.user_preferences.system.dpi / 72.0
|
||||||
space.cursor_location = v2d.region_to_view(event.mouse_region_x,
|
space.cursor_location = v2d.region_to_view(event.mouse_region_x,
|
||||||
event.mouse_region_y)
|
event.mouse_region_y)
|
||||||
|
space.cursor_location /= dpi_fac
|
||||||
|
|
||||||
else:
|
else:
|
||||||
space.cursor_location = tree.view_center
|
space.cursor_location = tree.view_center
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user