Skip to content

Commit a5d9eeb

Browse files
update only the property value in the property pane
Only update the property value of the node being dragged, don't update all the properties. This makes it less laggy (I forgot I could do this, so I didn't, lol).
1 parent 2e6dc64 commit a5d9eeb

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/main.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -913,9 +913,6 @@ def updateObject(self, obj : wmwpy.classes.Object | None):
913913
width = 2,
914914
tags = ('path', 'pathLine', id),
915915
)
916-
917-
918-
919916

920917
# logging.info(f"id: {id}")
921918
# logging.info(f"pos: {pos}\n")
@@ -1043,7 +1040,7 @@ def showPopup(self, menu : tk.Menu, event : tk.Event = None, callback : typing.C
10431040
finally:
10441041
menu.grab_release()
10451042

1046-
def moveObject(self, obj : wmwpy.classes.Object = None, amount : tuple[float,float] = (0,0)) -> tuple[float,float]:
1043+
def moveObject(self, obj : wmwpy.classes.Object | None = None, amount : tuple[float,float] = (0,0)) -> tuple[float,float]:
10471044
if not self.checkLevelFocus():
10481045
return
10491046

@@ -1915,9 +1912,9 @@ def dragPart(self, event: tk.Event = None, obj: wmwpy.classes.Object | None = No
19151912

19161913
logging.debug(f'new pos: {pos}')
19171914
obj.properties[self.selectedPart['property']] = ' '.join([str(x) for x in pos])
1915+
self.objectProperties[self.selectedPart['property']]['var'][0].set(obj.properties[self.selectedPart['property']])
19181916

19191917
self.updateObject(obj)
1920-
self.updateProperties(obj)
19211918

19221919
def createMenubar(self):
19231920
self.menubar = tk.Menu(self)

0 commit comments

Comments
 (0)