fix: ignore stale coordinate data for panels + convert wavyline to use new qt 6.12 canvas painter api
This commit is contained in:
@@ -22,6 +22,9 @@ class BlobRect2 : public BlobShape2 {
|
||||
Q_PROPERTY(
|
||||
QQmlListProperty<BlobRect2> excludeCorners READ excludeCorners NOTIFY
|
||||
excludeCornersChanged)
|
||||
Q_PROPERTY(
|
||||
bool atRestOverride READ atRestOverride WRITE setAtRestOverride NOTIFY
|
||||
atRestOverrideChanged)
|
||||
Q_PROPERTY(
|
||||
qreal topLeftRadius READ topLeftRadius WRITE setTopLeftRadius NOTIFY
|
||||
topLeftRadiusChanged)
|
||||
@@ -69,11 +72,24 @@ class BlobRect2 : public BlobShape2 {
|
||||
QQmlListProperty<BlobRect2> exclude();
|
||||
QQmlListProperty<BlobRect2> excludeCorners();
|
||||
|
||||
[[nodiscard]] bool atRestOverride() const { return m_atRestOverride; }
|
||||
|
||||
void setAtRestOverride(bool o) {
|
||||
if (m_atRestOverride == o) return;
|
||||
m_atRestOverride = o;
|
||||
emit atRestOverrideChanged();
|
||||
if (m_group) m_group->markDirty();
|
||||
}
|
||||
|
||||
bool isExcluded(const BlobShape2* other) const override;
|
||||
bool isCornerExcluded(const BlobShape2* other) const override;
|
||||
// The shape that is pushing is the one that can shape the bar edge. A shape that is
|
||||
// retiring still counts, because the retire curve is still moving the surface.
|
||||
bool isMoving() const override { return m_physicsActive || m_retiring; }
|
||||
// atRestOverride keeps the shape in the group's data even at rest; when it is false
|
||||
// the actual spring state decides, so it is not an override of the state itself.
|
||||
bool isMoving() const override {
|
||||
return m_atRestOverride || m_physicsActive || m_retiring;
|
||||
}
|
||||
void cornerRadii(float out[4]) const override;
|
||||
|
||||
[[nodiscard]] qreal topLeftRadius() const { return m_topLeftRadius; }
|
||||
@@ -100,6 +116,7 @@ class BlobRect2 : public BlobShape2 {
|
||||
void deformScaleChanged();
|
||||
void excludeChanged();
|
||||
void excludeCornersChanged();
|
||||
void atRestOverrideChanged();
|
||||
void topLeftRadiusChanged();
|
||||
void topRightRadiusChanged();
|
||||
void bottomLeftRadiusChanged();
|
||||
@@ -119,6 +136,10 @@ class BlobRect2 : public BlobShape2 {
|
||||
bool m_physicsActive = false;
|
||||
bool m_hasPrevPos = false;
|
||||
|
||||
// Set from QML. Keeps the shape in the group's data while it is at rest; when it is
|
||||
// false the spring state decides on its own.
|
||||
bool m_atRestOverride = false;
|
||||
|
||||
bool m_retiring = false;
|
||||
QElapsedTimer m_retireElapsed;
|
||||
float m_retire00 = 1.0f;
|
||||
|
||||
Reference in New Issue
Block a user