From 564e4df900c258920fe72403e753457731e99805 Mon Sep 17 00:00:00 2001 From: SGCMarkus Date: Mon, 11 Mar 2024 15:40:00 +0100 Subject: [PATCH] astrodatagui: show - if no rotational velocity or distance are found --- main/astrodatagui/AstrodataGUI.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main/astrodatagui/AstrodataGUI.py b/main/astrodatagui/AstrodataGUI.py index 0677f21..2855bb4 100644 --- a/main/astrodatagui/AstrodataGUI.py +++ b/main/astrodatagui/AstrodataGUI.py @@ -132,8 +132,14 @@ class AstrodataGUI(QtWidgets.QMainWindow): def updateStarInfo(self, starInfo): self.lbSpType.setText(starInfo[0]) - self.lbRotVel.setText(f"{starInfo[1]} {starInfo[2]}") - self.lbDistance.setText(f"{starInfo[3]} {starInfo[4]}") + if(starInfo[1] > 0): + self.lbRotVel.setText(f"{starInfo[1]} {starInfo[2]}") + else: + self.lbRotVel.setText("-") + if(starInfo[3] > 0): + self.lbDistance.setText(f"{starInfo[3]} {starInfo[4]}") + else: + self.lbDistance.setText("-") def starSelected(self, item): seqs = self.starDB.getStarSequences(item.text())