From aae2ebad966a3c962390ec6b7dba5af4988925d5 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Sun, 13 Oct 2024 12:33:44 +0200 Subject: [PATCH] don't create the anchor for getters --- src/controls/QskItemAnchors.cpp | 2 +- src/controls/QskItemAnchors.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controls/QskItemAnchors.cpp b/src/controls/QskItemAnchors.cpp index 1ddfe404..79f9d3b5 100644 --- a/src/controls/QskItemAnchors.cpp +++ b/src/controls/QskItemAnchors.cpp @@ -175,7 +175,7 @@ void QskItemAnchors::setCenterOffset( Qt::Orientation orientation, qreal offset qreal QskItemAnchors::centerOffset( Qt::Orientation orientation ) { - if ( const auto anchors = qskGetOrCreateAnchors( m_attachedItem ) ) + if ( const auto anchors = qskGetAnchors( m_attachedItem ) ) { if ( orientation == Qt::Horizontal ) return anchors->horizontalCenterOffset(); diff --git a/src/controls/QskItemAnchors.h b/src/controls/QskItemAnchors.h index f75fab77..3885a291 100644 --- a/src/controls/QskItemAnchors.h +++ b/src/controls/QskItemAnchors.h @@ -18,7 +18,7 @@ class QQuickItem; that has been designed to be used from QML. Qt/Quick anchoring is a simple concept, that allows to attach - borders ( Qt::AnchorPoint ) of attachedItem to a borders of + borders ( Qt::AnchorPoint ) of attachedItem to a border of other items. It is up to the user to avoid cycles or conflicting anchor chains.