diff --git a/pylot/core/active/ActiveSeismoPick3D_GUI.py b/pylot/core/active/ActiveSeismoPick3D_GUI.py index b6a48568..e39e4c8d 100755 --- a/pylot/core/active/ActiveSeismoPick3D_GUI.py +++ b/pylot/core/active/ActiveSeismoPick3D_GUI.py @@ -90,9 +90,11 @@ class gui_control(object): if self.continueDialogMessage('Use geometry information of active Seismic Array?'): if self.gen_survey_fromSeisArray(): self.initNewSurvey() - else: - if self.gen_survey_fromSRfiles(): - self.initNewSurvey() + return + else: + return + if self.gen_survey_fromSRfiles(): + self.initNewSurvey() def initNewSurvey(self): self.survey.setArtificialPick(0, 0) # artificial pick at source origin @@ -204,8 +206,8 @@ class gui_control(object): self.printDialogMessage('Got no Seismic Array.') return if self.checkConnected2SurveyState(): - if self.continueDialogMessage('Existing Survey already got Seismic Array object. Continue?'): - pass + if not self.continueDialogMessage('Existing Survey already got Seismic Array object. Continue?'): + return self.survey.seisarray = self.seisarray self.setConnected2SurveyState(True) self.survey._initiate_SRfiles() @@ -323,6 +325,10 @@ class gui_control(object): self.printDialogMessage('Wrong input file of type %s, expected %s.' %(type(survey), activeSeismoPick.Survey)) return + if self.checkSeisArrayState() and survey.seisarray is not None: + if not self.continueDialogMessage('Survey got existing Seismic Array.' + ' Do you want to overwrite the current Seismic Array?'): + return self.survey = survey self.setSurveyState(True) if self.survey.picked: diff --git a/pylot/core/active/generate_survey_layout_minimal.py b/pylot/core/active/generate_survey_layout_minimal.py new file mode 100644 index 00000000..c0af304b --- /dev/null +++ b/pylot/core/active/generate_survey_layout_minimal.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'generate_survey_layout_minimal.ui' +# +# Created: Tue Jun 28 14:40:07 2016 +# by: pyside-uic 0.2.15 running on PySide 1.2.2 +# +# WARNING! All changes made in this file will be lost! + +from PySide import QtCore, QtGui + +class Ui_generate_survey_minimal(object): + def setupUi(self, generate_survey_minimal): + generate_survey_minimal.setObjectName("generate_survey_minimal") + generate_survey_minimal.resize(325, 83) + icon = QtGui.QIcon() + icon.addPixmap(QtGui.QPixmap("../asp3d_icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + generate_survey_minimal.setWindowIcon(icon) + self.verticalLayout = QtGui.QVBoxLayout(generate_survey_minimal) + self.verticalLayout.setObjectName("verticalLayout") + self.gridLayout = QtGui.QGridLayout() + self.gridLayout.setObjectName("gridLayout") + self.lineEdit_obs = QtGui.QLineEdit(generate_survey_minimal) + self.lineEdit_obs.setObjectName("lineEdit_obs") + self.gridLayout.addWidget(self.lineEdit_obs, 0, 1, 1, 1) + self.label_obs = QtGui.QLabel(generate_survey_minimal) + self.label_obs.setObjectName("label_obs") + self.gridLayout.addWidget(self.label_obs, 0, 0, 1, 1) + self.pushButton_obs = QtGui.QPushButton(generate_survey_minimal) + self.pushButton_obs.setObjectName("pushButton_obs") + self.gridLayout.addWidget(self.pushButton_obs, 0, 2, 1, 1) + self.verticalLayout.addLayout(self.gridLayout) + self.buttonBox = QtGui.QDialogButtonBox(generate_survey_minimal) + self.buttonBox.setOrientation(QtCore.Qt.Horizontal) + self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok) + self.buttonBox.setObjectName("buttonBox") + self.verticalLayout.addWidget(self.buttonBox) + + self.retranslateUi(generate_survey_minimal) + QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), generate_survey_minimal.accept) + QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), generate_survey_minimal.reject) + QtCore.QMetaObject.connectSlotsByName(generate_survey_minimal) + + def retranslateUi(self, generate_survey_minimal): + generate_survey_minimal.setWindowTitle(QtGui.QApplication.translate("generate_survey_minimal", "Generate new Survey", None, QtGui.QApplication.UnicodeUTF8)) + self.label_obs.setToolTip(QtGui.QApplication.translate("generate_survey_minimal", "\n" +"
\n" +"Specifiy directory containing seismograms for each shot.
\n" +"Currently in the format SEGY with each file named \'shotnumber*_pickle.dat\'.
\n" +"\n" +"For example:
\n" +"\n" +"Shot number 100 containing seismograms for all traces with the name:
\n" +"\n" +"100_pickle.dat
", None, QtGui.QApplication.UnicodeUTF8)) + self.label_obs.setText(QtGui.QApplication.translate("generate_survey_minimal", "Seismogram\n" +"Directory [?]", None, QtGui.QApplication.UnicodeUTF8)) + self.pushButton_obs.setText(QtGui.QApplication.translate("generate_survey_minimal", "Browse", None, QtGui.QApplication.UnicodeUTF8)) +