Skip to content

Commit

Permalink
https://github.com/StephaneCouturier/Katalog/issues/559
Browse files Browse the repository at this point in the history
  • Loading branch information
StephaneCouturier committed Oct 27, 2024
1 parent 18e2e14 commit 082a8a8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void Device::loadSubDeviceList(QString connectionName)
QString queryLoadSubDeviceListSQL;

//Prepare Query
if(type !="All"){
if(type !=QCoreApplication::translate("MainWindow","All")){
queryLoadSubDeviceListSQL = QLatin1String(R"(
SELECT
device_id, device_type
Expand Down
2 changes: 2 additions & 0 deletions src/mainwindow_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@
}

selectedDevice->ID = settings.value("Selection/SelectedDeviceID").toInt();
if(selectedDevice->ID == 0) selectedDevice->type = tr("All");
selectedDevice->loadDevice("defaultconnection");

graphicStartDate = QDateTime::fromString(settings.value("Statistics/graphStartDate").toString(),"yyyy-mm-dd");

Expand Down
4 changes: 3 additions & 1 deletion src/mainwindow_tab_filters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@
//Reset selected values
selectedDevice = new Device();
selectedDevice->type = tr("All");
selectedDevice->ID = 0;
selectedDevice->loadDevice("defaultConnection");

//Reset displayed values
ui->Filters_label_DisplayStorage->setText(tr("All"));
Expand Down Expand Up @@ -374,7 +376,7 @@
}
//----------------------------------------------------------------------
void MainWindow::displaySelectedDeviceName(){
if ( selectedDevice->type == "" )
if ( selectedDevice->type == "" or selectedDevice->type == tr("All") )
{
ui->Filters_label_DisplayDevice->setText(tr("All"));
ui->Filters_label_DisplayStorage->setText(tr("All"));
Expand Down

0 comments on commit 082a8a8

Please sign in to comment.