diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-17 14:48:32 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-17 14:48:32 +0400 |
commit | 8053b9a80100ce4a6f431acf3eb03a6c1d270968 (patch) | |
tree | 8c2977bb6a79e2159bf3ff1e44d7f9515d8f2080 /release/scripts | |
parent | 4c41ad2299bb77720a277146152c5c84a96d70e2 (diff) |
re-commit temp workaround [#35920], this still fails for OSX retina display,
but at least it resolves for DPI values other then 72.
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_operators/node.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_operators/node.py b/release/scripts/startup/bl_operators/node.py index cc1fa93ec2c..c70b5832bfb 100644 --- a/release/scripts/startup/bl_operators/node.py +++ b/release/scripts/startup/bl_operators/node.py @@ -66,8 +66,12 @@ class NodeAddOperator(): # convert mouse position to the View2D for later node placement 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, event.mouse_region_y) + space.cursor_location /= dpi_fac + else: space.cursor_location = tree.view_center |