提交 648a43fd 编写于 作者: 锦鲤AI幸运's avatar 锦鲤AI幸运 🎯

增加打开的数据集文件夹的功能,且移动原文件夹会提示,代码格式规范

上级 22d3ead4
...@@ -1460,13 +1460,12 @@ class MainWindow(QMainWindow, WindowMixin): ...@@ -1460,13 +1460,12 @@ class MainWindow(QMainWindow, WindowMixin):
defaultOpenDirPath = self.lastOpenDir defaultOpenDirPath = self.lastOpenDir
else: else:
if self.lang == 'ch': if self.lang == 'ch':
self.actions.open_dataset_dir.setEnabled(False)
self.msgBox.warning(self, "提示", "\n 原文件夹已不存在,请从新选择数据集路径!") self.msgBox.warning(self, "提示", "\n 原文件夹已不存在,请从新选择数据集路径!")
defaultOpenDirPath = os.path.dirname(self.filePath) if self.filePath else '.'
else: else:
self.actions.open_dataset_dir.setEnabled (False)
self.msgBox.warning (self, "Warn", "\n The original folder no longer exists, please choose the data set path again!") self.msgBox.warning (self, "Warn", "\n The original folder no longer exists, please choose the data set path again!")
defaultOpenDirPath = os.path.dirname (self.filePath) if self.filePath else '.'
self.actions.open_dataset_dir.setEnabled(False)
defaultOpenDirPath = os.path.dirname(self.filePath) if self.filePath else '.'
def importDirImages(self, dirpath, isDelete = False): def importDirImages(self, dirpath, isDelete = False):
if not self.mayContinue() or not dirpath: if not self.mayContinue() or not dirpath:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册