Actions
Bug #10512
closed
AF
MV
After the model is reset, elements in WTreeView no longer respect the disabled status of the view
Bug #10512:
After the model is reset, elements in WTreeView no longer respect the disabled status of the view
Start date:
06/20/2022
Due date:
% Done:
100%
Estimated time:
Description
Consider the example:
auto layout = std::make_unique<Wt::WVBoxLayout>();
auto model = std::make_shared<Wt::WStringListModel>();
std::vector<Wt::WString> data = { "aaa", "bbb", "ccc" };
model->setStringList(data);
auto view = layout->addWidget(std::make_unique<Wt::WTreeView>());
view->setSelectionMode(Wt::SelectionMode::Single);
view->setModel(model);
auto button1 = layout->addWidget(std::make_unique<Wt::WPushButton>("Disable view"));
button1->clicked().connect([view]() {
view->setDisabled(true);
});
auto button2 = layout->addWidget(std::make_unique<Wt::WPushButton>("Reset model"));
button2->clicked().connect([view, model]() {
view->setModel(model);
});
root()->setLayout(std::move(layout));
root()->setMaximumSize(200, 200);
After creation, the elements are selectable.
First we click the button "Disable view". Elements can no longer be selected.
Then we reset the model by clicking on the "Reset model" button. Elements can be selected again although the view is disabled.
AF Updated by Andreas Frolov about 4 years ago
The same problem occurs when the model sends the signal layoutChanged.
RS Updated by Roel Standaert about 4 years ago
- Target version set to 4.9.0
RS Updated by Roel Standaert almost 4 years ago
- Target version changed from 4.9.0 to 4.10.0
MV Updated by Matthias Van Ceulebroeck over 3 years ago
- Target version changed from 4.10.0 to 4.10.1
MV Updated by Matthias Van Ceulebroeck about 3 years ago
- Status changed from New to InProgress
- Assignee set to Matthias Van Ceulebroeck
MV Updated by Matthias Van Ceulebroeck about 3 years ago
- Status changed from InProgress to Review
- Assignee deleted (
Matthias Van Ceulebroeck)
YG Updated by Yoika Ghysens about 3 years ago
- Assignee set to Yoika Ghysens
MV Updated by Matthias Van Ceulebroeck almost 3 years ago
- Status changed from Review to Implemented @Emweb
- Assignee changed from Yoika Ghysens to Matthias Van Ceulebroeck
- % Done changed from 0 to 100
MV Updated by Matthias Van Ceulebroeck almost 3 years ago
- Status changed from Implemented @Emweb to Closed
AF Updated by Andreas Frolov almost 2 years ago
The bug fix does not work with WBootstrap5Theme. Tested with version 4.11.0.
MV Updated by Matthias Van Ceulebroeck almost 2 years ago
Hello Andreas,
thank you for following up on this. There indeed is still a case for Bootstrap 5 specifically it seems, due to it being able to visually select items outside Wt. I have created #13106 to track this for the next version.
Actions