Project

General

Profile

Actions

Bug #14437

open
AR RM

Wrong calculation of height when replacing container widget

Bug #14437: Wrong calculation of height when replacing container widget

Added by Achim Reutelsterz 5 months ago. Updated 19 days ago.

Status:
Implemented @Emweb
Priority:
Normal
Target version:
Start date:
03/25/2026
Due date:
% Done:

0%

Estimated time:

Description

In our application, we dynamically replace the main container widget that is displayed on user interaction.
If this container includes a grid layout, it seems that the grid layout's height is recalculated differently every time we update the container.

You can see this behaviour in the attached example if you hit several times the button.
With WT 4.10.4 this effect did not occur.


Files

main.cpp (2.79 KB) main.cpp Achim Reutelsterz, 03/25/2026 05:06 PM
after_updating_container_several_times.png (5.91 KB) after_updating_container_several_times.png Achim Reutelsterz, 03/26/2026 09:43 AM
on_application_start.png (13.2 KB) on_application_start.png Achim Reutelsterz, 03/26/2026 09:43 AM
main.cpp (4.93 KB) main.cpp Achim Reutelsterz, 07/09/2026 04:03 PM

AR Updated by Achim Reutelsterz 5 months ago Actions #1

I forgot to mention that if I hit Refresh (F5) the page looks correct again.

AR Updated by Achim Reutelsterz 2 months ago Actions #3

Is there any news about that? This problem also occurs with WT 4.13.3.
I found out that it only happens with Flex Layout implementation. With Javascript Layout it seems to be fine.

AR Updated by Achim Reutelsterz about 2 months ago Actions #4

After investigating the issue further I found that when a container is removed from its parent (e.g. via removeFromParent()), an empty

element remains in the browser DOM.
As a workaround, I keep the outer container and only replace its child widgets. With this approach, the layout remains stable and the issue does not occur.
Please see the attached revised example. With the left upper button the problem is reproducible.

AR Updated by Achim Reutelsterz about 2 months ago Actions #5

With the right upper button the problem doesn't occur.

RM Updated by Romain Mardulyn 25 days ago Actions #6

  • Target version set to 4.14.2

RM Updated by Romain Mardulyn 21 days ago Actions #7

  • Status changed from New to InProgress
  • Assignee set to Romain Mardulyn

RM Updated by Romain Mardulyn 21 days ago Actions #8

  • Status changed from InProgress to Review
  • Assignee deleted (Romain Mardulyn)

ED Updated by emil de keyser 19 days ago Actions #9

  • Assignee set to emil de keyser

ED Updated by emil de keyser 19 days ago Actions #10

  • Status changed from Review to Resolved
  • Assignee changed from emil de keyser to Romain Mardulyn

RM Updated by Romain Mardulyn 19 days ago Actions #11

  • Status changed from Resolved to Implemented @Emweb
Actions

Also available in: PDF Atom