修复导入时错误输入路径时崩溃的bug

This commit is contained in:
Yorusora 2025-02-11 20:47:40 +08:00
parent a3819c1e88
commit b9b85123c7

View File

@ -313,6 +313,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.msgBox.exec()
def slot_btn_dataInput(self):
if self.lineEdit_data1path.text() != "" and self.lineEdit_data2path.text() != "" and self.lineEdit_label1path.text() != "" and self.lineEdit_label2path.text() != "":
info("Inputing Data...")
self.textBrowser_update("提示:开始导入数据")
MainWindow.setWindowTitle(self, QCoreApplication.translate("MainWindow",
@ -382,6 +383,12 @@ class MainWindow(QMainWindow, Ui_MainWindow):
info("Finished Input Data.")
self.textBrowser_update("提示:导入数据完成")
else:
info("Failed to Input Data!")
self.textBrowser_update("操作:导入数据失败")
self.msgBox.setText("导入失败,请正确输入路径")
self.msgBox.setIcon(QMessageBox.Critical)
self.msgBox.exec()
def slot_radioBtn_inputMode_auto(self):
self.pushButton_rootpath_open.setEnabled(True)