From 044aa47d3574fbd89531cee0c8961f3a0899efce Mon Sep 17 00:00:00 2001 From: SGCMarkus Date: Wed, 6 Mar 2024 15:45:11 +0100 Subject: [PATCH] astrodatagui: NewStarDialog: proper behaviour if Ok button is pressed before fetching --- main/astrodatagui/ui/NewStarDialog.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/astrodatagui/ui/NewStarDialog.py b/main/astrodatagui/ui/NewStarDialog.py index dd2c451..2ac6e9b 100644 --- a/main/astrodatagui/ui/NewStarDialog.py +++ b/main/astrodatagui/ui/NewStarDialog.py @@ -61,6 +61,7 @@ class NewStarDialog(QDialog): if self.currentObservations: if(self.leStarIdentifier.text() != self.starIdentifier): self.showErrorMessage("Star Identifier", "Star identifier of fetched data does not match current name") + return keplerKadences = [self.cbKeplerShortCadence.isChecked(), self.cbKeplerLongCadence.isChecked()] @@ -70,6 +71,8 @@ class NewStarDialog(QDialog): self.productManifest = downloadStarProducts(self.currentObservations, keplerKadences, k2Kadences) self.accept() + else: + self.showErrorMessage("No data fetched", "You have to fetch data first before you can proceed!") def btCancel_clicked(self): self.reject() \ No newline at end of file