Don't trigger layout during wasAdded

This commit is contained in:
Shadowfacts 2019-08-10 22:48:19 -04:00
parent 1392d284d1
commit b893f83032
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 1 additions and 1 deletions

View File

@ -134,6 +134,7 @@ class ProgramBlockView(val block: ProgramBlock): StackView(Axis.VERTICAL, Distri
override fun mouseDragged(startPoint: Point, delta: Point, mouseButton: MouseButton): Boolean { override fun mouseDragged(startPoint: Point, delta: Point, mouseButton: MouseButton): Boolean {
block.position += delta block.position += delta
updateDraggingConstraints() updateDraggingConstraints()
window!!.layout()
return true return true
} }
@ -144,7 +145,6 @@ class ProgramBlockView(val block: ProgramBlock): StackView(Axis.VERTICAL, Distri
xConstraint = (leftAnchor equalTo superview!!.leftAnchor + block.position.x) xConstraint = (leftAnchor equalTo superview!!.leftAnchor + block.position.x)
yConstraint = (topAnchor equalTo superview!!.topAnchor + block.position.y) yConstraint = (topAnchor equalTo superview!!.topAnchor + block.position.y)
} }
window!!.layout()
} }
override fun drawContent(mouse: Point, delta: Float) { override fun drawContent(mouse: Point, delta: Float) {