Bug #1306

Severe problem related to enabling/disabling widgets in a recent commit

Added by Jake Petroules over 9 years ago. Updated about 9 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


I have a Wt slot that enables or disables a set of widgets. Prior to the last 8 or so commits, the functionality worked fine, but something has now broken it and the setHidden method has no effect on the page even though subsequent calls to isVisible or isHidden reflect the correct value. The proper state is set correctly on first load, but not when the slot is called after that.

I'm going to spend more time tracking down the exact commit that broke this, tomorrow, and provide as much information as I can. Google Chrome's console shows no JavaScript errors.

Sidenote: dialogs appear not to center correctly anymore. When I open a dialog it shows in the bottom right corner instead of the center of the screen.


patch.diff (1010 Bytes) patch.diff Jake Petroules, 05/30/2012 06:37 PM

Updated by Jake Petroules over 9 years ago

The problem appears to have been introduced with commit b995eb4 (and persists through to 8cc41f5) as enabling/disabling works fine with the immediately previous 6480568. I'll provide more information later if I can.


Updated by Koen Deforche over 9 years ago


To see that we are looking in the right direction: can you confirm that you are using WTemplate ?




Updated by Jake Petroules over 9 years ago

Yes, the widget in question is a WContainerWidget subclass bound to a WTemplate.

Thanks for looking into this so quickly.


Updated by Jake Petroules over 9 years ago

Hi Koen,

I did some more investigating and it appears that the changes that you made to WTemplate::updateDom(DomElement&, bool) in b995eb4 caused this problem. I've attached a patch file showing (a reversal of) the exact changes you made for convenience. I'm not sure what the original intent of your patch was, nor am I very familiar with Wt's internals so this is the most I can give you but I hope this helps some in getting the problem fixed.




Updated by Koen Deforche over 9 years ago


I suspected the same with you and I've already pushed yesterday the same reversal.

The problem was that for widgets that were not being rerendered, their rendering state was cleared by toggling setRendered().





Updated by Koen Deforche over 9 years ago

  • Status changed from New to Resolved
  • Assignee set to Koen Deforche
  • Target version set to 3.2.2

Updated by Koen Deforche about 9 years ago

  • Status changed from Resolved to Closed

Released in Wt 3.2.2

Also available in: Atom PDF