Skip to content

Commit

Permalink
Merge pull request #337 from jchanvfx/pipe_improvements
Browse files Browse the repository at this point in the history
Pipe drawing improvements
  • Loading branch information
jchanvfx authored May 8, 2023
2 parents e10a874 + c77945f commit c7e1fad
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 184 deletions.
2 changes: 1 addition & 1 deletion NodeGraphQt/pkg_info.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
__version__ = '0.5.10'
__version__ = '0.5.11'
__status__ = 'Work in Progress'
__license__ = 'MIT'

Expand Down
10 changes: 9 additions & 1 deletion NodeGraphQt/qgraphics/node_backdrop.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,16 @@ def get_nodes(self, inc_intersects=False):

def calc_backdrop_size(self, nodes=None):
nodes = nodes or self.get_nodes(True)
if nodes:
nodes_rect = self._combined_rect(nodes)
else:
center = self.mapToScene(self.boundingRect().center())
nodes_rect = QtCore.QRectF(
center.x(), center.y(),
self._min_size[0], self._min_size[1]
)

padding = 40
nodes_rect = self._combined_rect(nodes)
return {
'pos': [
nodes_rect.x() - padding, nodes_rect.y() - padding
Expand Down
Loading

0 comments on commit c7e1fad

Please sign in to comment.