[hotfix] metadata could not be read (improve this)
This commit is contained in:
parent
4896c1e1d8
commit
2379dee142
12
PyLoT.py
12
PyLoT.py
@ -3128,19 +3128,17 @@ class MainWindow(QMainWindow):
|
|||||||
settings.setValue("inventoryFile", self.project.inv_path)
|
settings.setValue("inventoryFile", self.project.inv_path)
|
||||||
|
|
||||||
fninv = settings.value("inventoryFile", None)
|
fninv = settings.value("inventoryFile", None)
|
||||||
if fninv and ask_default:
|
if (fninv and ask_default) and not new:
|
||||||
ans = QMessageBox.question(self, self.tr("Use default metadata..."),
|
ans = QMessageBox.question(self, self.tr("Use default metadata..."),
|
||||||
self.tr(
|
self.tr(
|
||||||
"Do you want to use the default value for metadata?\n({})".format(fninv)),
|
"Do you want to use the default value for metadata?\n({})".format(fninv)),
|
||||||
QMessageBox.Yes | QMessageBox.No,
|
QMessageBox.Yes | QMessageBox.No,
|
||||||
QMessageBox.Yes)
|
QMessageBox.Yes)
|
||||||
if ans == QMessageBox.No:
|
if ans == QMessageBox.Yes:
|
||||||
if not set_inv(settings):
|
|
||||||
return None
|
|
||||||
elif ans == QMessageBox.Yes:
|
|
||||||
self.read_metadata_thread(fninv)
|
self.read_metadata_thread(fninv)
|
||||||
if fninv and not ask_default:
|
return
|
||||||
self.read_metadata_thread(fninv)
|
set_inv(settings)
|
||||||
|
|
||||||
|
|
||||||
def calc_magnitude(self, type='ML'):
|
def calc_magnitude(self, type='ML'):
|
||||||
self.init_metadata()
|
self.init_metadata()
|
||||||
|
Loading…
Reference in New Issue
Block a user