https://bugs.kde.org/show_bug.cgi?id=513185

cwo <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|                            |https://invent.kde.org/fram
                   |                            |eworks/kirigami/-/commit/f8
                   |                            |b4aadf1b79b983fe00b9c5f6dea
                   |                            |296b80c6027

--- Comment #2 from cwo <[email protected]> ---
Git commit f8b4aadf1b79b983fe00b9c5f6dea296b80c6027 by Christoph Wolk.
Committed on 19/12/2025 at 22:25.
Pushed by cwo into branch 'master'.

layouts/FormLayout: avoid binding loop during initial load

FormLayout tracks the implicit width in wide mode in a separate property
and uses this to decide which mode to use. When the implicitWidth
changes, this property is updated with a 0-ms timer, i.e. when the event
loop is clear. This generally prevents a binding loop. But during a
relayout, the update happens immediately, and then can cause a binding
loop, in particular during initialization of the page as at this point
the sizing can widely vary, and the component flips between wide and
narrow mode as contents are added and the available size of the layout
itself is determined. In this case, it may (and usually does) happen
that the component thinks wide mode should be off, some change triggers
a reevluation of the binding, it's changed to on, the
wideModeImplicitWidth is updated and the binding may be reevaluated
again while it's still in the process of finishing up the previous one,
which triggers the binding loop detection.

Instead, we make relayouting also use the timer, rather than immediately
triggering its effect. This avoids the loop. We also trigger it
explicitly in Component.onCompleted as the test (and potentially other
things) expects it to be match after that.

M  +5    -2    src/layouts/FormLayout.qml

https://invent.kde.org/frameworks/kirigami/-/commit/f8b4aadf1b79b983fe00b9c5f6dea296b80c6027

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to