From 3b003156f2beb9c9941f8c213fdb5c0c8ed3b93f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Couturier?= Date: Wed, 24 Jul 2024 06:47:23 +0200 Subject: [PATCH] https://github.com/StephaneCouturier/Katalog/issues/544 --- src/mainwindow_tab_device.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mainwindow_tab_device.cpp b/src/mainwindow_tab_device.cpp index 2eeaa36..018708e 100644 --- a/src/mainwindow_tab_device.cpp +++ b/src/mainwindow_tab_device.cpp @@ -2163,7 +2163,7 @@ void MainWindow::loadDevicesCatalogToModel(){ FROM device d JOIN catalog c ON d.device_external_id = c.catalog_id WHERE device_type = 'Catalog' - AND device_group_id = 0 + AND device_group_id = :device_group_id )"); if ( selectedDevice->type == "Storage" ){ @@ -2194,6 +2194,7 @@ void MainWindow::loadDevicesCatalogToModel(){ loadCatalogQuery.prepare(loadCatalogQuerySQL); loadCatalogQuery.bindValue(":device_id", selectedDevice->ID); loadCatalogQuery.bindValue(":device_parent_id", selectedDevice->ID); + loadCatalogQuery.bindValue(":device_group_id", selectedDevice->groupID); loadCatalogQuery.exec(); //Prepare the tree model: headers