From 8949f90a3b20cac9ed6cf6ec3c77b25bdd6d6eff Mon Sep 17 00:00:00 2001 From: Spiros Date: Sun, 2 Jun 2024 15:51:39 +0300 Subject: [PATCH] Some controllers are stupid, show dashes instead of 0 GB --- custombutton.cpp | 2 +- mainwindow.cpp | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/custombutton.cpp b/custombutton.cpp index 6e2947d..88f275f 100644 --- a/custombutton.cpp +++ b/custombutton.cpp @@ -58,7 +58,7 @@ void CustomButton::setText2(const QString &newText2) { if (text2 != newText2) { text2 = newText2; adjustWidthToFitText(); - update(); // Repaint the button + update(); } } diff --git a/mainwindow.cpp b/mainwindow.cpp index d56d60e..822019b 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -310,6 +310,14 @@ void MainWindow::populateWindow(const QJsonObject &localObj, const QString &heal } } + if (totalReads == "0 GB") { + totalReads = "----"; + } + + if (totalWrites == "0 GB") { + totalWrites = "----"; + } + totalReadsLineEdit->setText(totalReads); totalReadsLineEdit->setAlignment(Qt::AlignRight);