astrodatagui: NewStarDialog: proper behaviour if Ok button is pressed before fetching

This commit is contained in:
2024-03-06 15:45:11 +01:00
parent aed3a9bcfd
commit 044aa47d35
+3
View File
@@ -61,6 +61,7 @@ class NewStarDialog(QDialog):
if self.currentObservations: if self.currentObservations:
if(self.leStarIdentifier.text() != self.starIdentifier): if(self.leStarIdentifier.text() != self.starIdentifier):
self.showErrorMessage("Star Identifier", "Star identifier of fetched data does not match current name") self.showErrorMessage("Star Identifier", "Star identifier of fetched data does not match current name")
return
keplerKadences = [self.cbKeplerShortCadence.isChecked(), keplerKadences = [self.cbKeplerShortCadence.isChecked(),
self.cbKeplerLongCadence.isChecked()] self.cbKeplerLongCadence.isChecked()]
@@ -70,6 +71,8 @@ class NewStarDialog(QDialog):
self.productManifest = downloadStarProducts(self.currentObservations, self.productManifest = downloadStarProducts(self.currentObservations,
keplerKadences, k2Kadences) keplerKadences, k2Kadences)
self.accept() self.accept()
else:
self.showErrorMessage("No data fetched", "You have to fetch data first before you can proceed!")
def btCancel_clicked(self): def btCancel_clicked(self):
self.reject() self.reject()