Two small fixes:
- "Add node" was showing on wrong location when used via pulldown menus. Now this option will put the nodes in center of the view. - The Curves widget was making itself smaller/bigger based on width of region. That messes up the layout engine now - especially the code that checks if there's a scroller needed or not (it went into an eternal feedback loop). Now this widget has fixed height (like the other larger widgets). Better would be to allow such large widgets to be scaled vertically individually. That's for the todo!
This commit is contained in:
@@ -29,10 +29,14 @@ class NodeAddOperator():
|
||||
def store_mouse_cursor(context, event):
|
||||
space = context.space_data
|
||||
v2d = context.region.view2d
|
||||
tree = space.edit_tree
|
||||
|
||||
# convert mouse position to the View2D for later node placement
|
||||
space.cursor_location = v2d.region_to_view(event.mouse_region_x,
|
||||
if context.region.type == 'WINDOW':
|
||||
space.cursor_location = v2d.region_to_view(event.mouse_region_x,
|
||||
event.mouse_region_y)
|
||||
else:
|
||||
space.cursor_location = tree.view_center
|
||||
|
||||
def create_node(self, context, node_type):
|
||||
space = context.space_data
|
||||
|
Reference in New Issue
Block a user