Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_operators/node.py4
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