Skip to content

Commit bbf94bb

Browse files
committed
backdrop set_size fix.
1 parent eb4770e commit bbf94bb

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

NodeGraphQt/base/node.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -620,22 +620,22 @@ def text(self):
620620
"""
621621
return self.get_property('backdrop_text')
622622

623-
def set_size(self, size=None):
623+
def set_size(self, width, height):
624624
"""
625625
Sets the backdrop size.
626626
627627
Args:
628-
size (tuple): width, height size.
629-
"""
630-
if size:
631-
if self.graph:
632-
self.graph.begin_undo('backdrop size')
633-
self.set_property('width', size[0])
634-
self.set_property('height', size[1])
635-
self.graph.end_undo()
636-
return
637-
self.view.width, self.view.height = size
638-
self.model.width, self.model.height = size
628+
width (float): backdrop width size.
629+
height (float): backdrop height size.
630+
"""
631+
if self.graph:
632+
self.graph.begin_undo('backdrop size')
633+
self.set_property('width', width)
634+
self.set_property('height', height)
635+
self.graph.end_undo()
636+
return
637+
self.view.width, self.view.height = width, height
638+
self.model.width, self.model.height = width, height
639639

640640
def size(self):
641641
"""

0 commit comments

Comments
 (0)