astrodatagui: NewStarDialog: proper behaviour if Ok button is pressed before fetching
This commit is contained in:
@@ -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()
|
||||
Reference in New Issue
Block a user