Bug #1306
closedSevere problem related to enabling/disabling widgets in a recent commit
0%
Description
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.
Files
Updated by Jake Petroules over 12 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 12 years ago
Hey,
To see that we are looking in the right direction: can you confirm that you are using WTemplate ?
Regards,
koen
Updated by Jake Petroules over 12 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 12 years ago
- File patch.diff patch.diff added
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.
Thanks,
Jake
Updated by Koen Deforche over 12 years ago
Hey,
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().
Thanks.
Regards,
koen
Updated by Koen Deforche over 12 years ago
- Status changed from New to Resolved
- Assignee set to Koen Deforche
- Target version set to 3.2.2
Updated by Koen Deforche over 12 years ago
- Status changed from Resolved to Closed
Released in Wt 3.2.2