From 6d2e695724a6a568456cb94bb283ce3d7787897c Mon Sep 17 00:00:00 2001 From: Tobias Jacob <tobias.jacob@kit.edu> Date: Tue, 8 Nov 2022 17:13:55 +0100 Subject: [PATCH] Fix empty list --- .../controller/ApplicationDatabaseController.cpp | 2 ++ .../ScenarioManager/controller/SettingsController.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/source/ArmarXGui/gui-plugins/ScenarioManager/controller/ApplicationDatabaseController.cpp b/source/ArmarXGui/gui-plugins/ScenarioManager/controller/ApplicationDatabaseController.cpp index 4f9e46c4..41038df4 100644 --- a/source/ArmarXGui/gui-plugins/ScenarioManager/controller/ApplicationDatabaseController.cpp +++ b/source/ArmarXGui/gui-plugins/ScenarioManager/controller/ApplicationDatabaseController.cpp @@ -88,6 +88,8 @@ void ApplicationDatabaseController::updatePackages() } treemodel.update(); + // For some unknown reason, resetting the smart pointer is necessary to see an updated results list. + model.reset(new FilterableTreeModelSortFilterProxyModel()); model->setSourceModel(&treemodel); emit modelUpdated(model); diff --git a/source/ArmarXGui/gui-plugins/ScenarioManager/controller/SettingsController.cpp b/source/ArmarXGui/gui-plugins/ScenarioManager/controller/SettingsController.cpp index 9fca3c52..add4f8e1 100644 --- a/source/ArmarXGui/gui-plugins/ScenarioManager/controller/SettingsController.cpp +++ b/source/ArmarXGui/gui-plugins/ScenarioManager/controller/SettingsController.cpp @@ -250,6 +250,8 @@ void SettingsController::updateModel() } treemodel->update(); + // For some unknown reason, resetting the smart pointer is necessary to see an updated results list. + model.reset(new FilterableTreeModelSortFilterProxyModel()); model->setSourceModel(treemodel.get()); settingsDialog.setModel(model); } -- GitLab