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.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()
|
||||||
Reference in New Issue
Block a user