Don't trigger layout during wasAdded
This commit is contained in:
parent
1392d284d1
commit
b893f83032
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue