diff --git a/device.cpp b/device.cpp
index 5354da9b..62b60b08 100644
--- a/device.cpp
+++ b/device.cpp
@@ -52,7 +52,7 @@ void Device::loadDevice(){
)");
query.prepare(querySQL);
- query.bindValue(":device_id",ID);
+ query.bindValue(":device_id", ID);
if (query.exec()) {
if (query.next()) {
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 0d369547..45cb046b 100755
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -43,7 +43,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
//Set current version, release date, and development mode
currentVersion = "2.0";
releaseDate = "2023-11-26";
- developmentMode = true;
+ developmentMode = false;
//Prepare paths, user setting file, check version
//Get user home path and application dir path
@@ -77,7 +77,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
hideDevelopmentUIItems();
}
- //Settings screen
+ //Settings screen
ui->Settings_lineEdit_DatabaseFilePath->setText(databaseFilePath);
ui->Settings_comboBox_DatabaseMode->setItemData(0, "Memory", Qt::UserRole);
ui->Settings_comboBox_DatabaseMode->setItemData(1, "File", Qt::UserRole);
@@ -132,28 +132,30 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
else if ( ui->Settings_comboBox_Theme->currentText() == tr("Katalog Colors (dark)") ){
loadCustomThemeDark();
}
+
//Load Collection data
- //Load Collection
- loadCollection();
- filterFromSelectedDevices();
-
- //Restore last opened catalog to Explore tab
- if(ui->Settings_checkBox_LoadLastCatalog->isChecked()==true){
- selectedCatalog->name = settings.value("Explore/lastSelectedCatalogName").toString();
- selectedCatalog->loadCatalog();
- selectedDirectoryName = settings.value("Explore/lastSelectedDirectory").toString();
- selectedDirectoryFullPath = selectedCatalog->sourcePath + "/" + selectedDirectoryName;
- ui->Explore_label_CatalogDirectoryDisplay->setText(selectedDirectoryName);
- if (selectedCatalog->filePath != ""){
- openCatalogToExplore();
- }
- }
+ //Load Collection
+ loadCollection();
+ selectedDevice->loadDevice();
+ filterFromSelectedDevices();
- //Preload last selected catalogs contents to memory
- if(ui->Settings_checkBox_PreloadCatalogs->isChecked()==true){
- preloadCatalogs();
+ //Restore last opened catalog to Explore tab
+ if(ui->Settings_checkBox_LoadLastCatalog->isChecked()==true){
+ selectedCatalog->name = settings.value("Explore/lastSelectedCatalogName").toString();
+ selectedCatalog->loadCatalog();
+ selectedDirectoryName = settings.value("Explore/lastSelectedDirectory").toString();
+ selectedDirectoryFullPath = selectedCatalog->sourcePath + "/" + selectedDirectoryName;
+ ui->Explore_label_CatalogDirectoryDisplay->setText(selectedDirectoryName);
+ if (selectedCatalog->filePath != ""){
+ openCatalogToExplore();
}
+ }
+
+ //Preload last selected catalogs contents to memory
+ if(ui->Settings_checkBox_PreloadCatalogs->isChecked()==true){
+ preloadCatalogs();
+ }
//Setup tabs
diff --git a/mainwindow.ui b/mainwindow.ui
index c038c656..d7fed73c 100644
--- a/mainwindow.ui
+++ b/mainwindow.ui
@@ -6921,6 +6921,13 @@ background: url(:/images/link-h.png) repeat-x center;
+ -
+
+
+ GenerateMissingIDs
+
+
+
-
@@ -8767,19 +8774,6 @@ background: url(:/images/link-h.png) repeat-x center;
-
-
-
- 270
- 10
- 231
- 26
-
-
-
- generateMissingIDs
-
-
diff --git a/mainwindow_tab_catalogs.cpp b/mainwindow_tab_catalogs.cpp
index 2716a726..fda0b8bb 100755
--- a/mainwindow_tab_catalogs.cpp
+++ b/mainwindow_tab_catalogs.cpp
@@ -583,9 +583,9 @@
//Execute query
loadCatalogQuery.prepare(loadCatalogQuerySQL);
- loadCatalogQuery.bindValue(":catalog_storage", selectedDevice->name);
- loadCatalogQuery.bindValue(":catalog_name", selectedDevice->name);
- loadCatalogQuery.bindValue(":device_id", selectedDevice->ID);
+ loadCatalogQuery.bindValue(":catalog_storage", selectedDevice->name);
+ loadCatalogQuery.bindValue(":catalog_name", selectedDevice->name);
+ loadCatalogQuery.bindValue(":device_id", selectedDevice->ID);
loadCatalogQuery.bindValue(":device_parent_id", selectedDevice->ID);
loadCatalogQuery.exec();