Bug #622
closedWTreeNodes cannot be expanded
0%
Description
Hello,
I have switched from wt-3.1.6 to latest git and i notice that i cannot expand the tree nodes anymore. Nothing happens when i click on the expand sign.
I haven't changed anything to my code. Is there an API change ?
Regards
Christophe
Updated by Koen Deforche over 13 years ago
Hey Christophe,
I cannot easily reproduce this problem --- do you see this problem for example with the widget gallery ?
Regards,
koen
Updated by Christophe Delépine over 13 years ago
Hi Koen,
I have spent quite some time analysing the problem. By simplifying my gui code as much as possible, i think i have isolated the bug :
Here is a piece of code :
WContainerWidget* container = new WContainerWidget();
WHBoxLayout *boxLayout = new WHBoxLayout(container);
boxLayout->setContentsMargins(0, 0, 0, 0);
WPanel* panel = new WPanel();
WTree* tree = new WTree();
panel->setCentralWidget(tree);
// fill the tree with nodes...
WStackedWidget* dynamicView = new WStackedWidget();
dynamicView->addWidget(new WContainerWidget());
boxLayout->addWidget(panel);
boxLayout->addWidget(dynamicView_, 1);
If i replace the line
boxLayout->addWidget(dynamicView_, 1);
with
boxLayout->addWidget(dynamicView_, 0);
then it works !
I have other widgets above the container but i have not tried to remove them. I hope that they have no impact.
I can easily change my code to make it work. However, something must have changed between wt-3.1.6 and the current git and only you can tell if this new behavior is normal
Regards
Christophe
P.S. the widget gallery project does not compile for non multithreaded builds due to StyleLayout.C. Had to remove this file. The tree works fine there. The problem was specific to my application
Updated by Koen Deforche over 13 years ago
- Status changed from New to Resolved
Hey Christophe,
Thanks a lot for isolating this regression. It has been fixed in latest git.
I've also fixed the non-threaded widget gallery build.
Regards,
koen
Updated by Christophe Delépine over 13 years ago
Thanks,
Your fix has solved the problem.
Note however that the widget gallery project still does not compile :
StyleLayout.C (94) : error C3861: 'sleep': identifier not found
Updated by Koen Deforche over 13 years ago
- Status changed from Resolved to Closed
Available in 3.1.7