diff --git a/hikyuu/gui/HikyuuTDX.py b/hikyuu/gui/HikyuuTDX.py index 68f4658a..3635a4bf 100644 --- a/hikyuu/gui/HikyuuTDX.py +++ b/hikyuu/gui/HikyuuTDX.py @@ -267,8 +267,6 @@ class MyMainWindow(QMainWindow, Ui_MainWindow): current_dir = os.path.dirname(__file__) self.setWindowIcon(QIcon("{}/hikyuu.ico".format(current_dir))) - # self.setFixedSize(self.width(), self.height()) - self.import_status_label.setText('') self.import_detail_textEdit.clear() self.reset_progress_bar() self.day_start_dateEdit.setMinimumDate(datetime.date(1990, 12, 19)) diff --git a/hikyuu/gui/data/ImportHistoryFinanceTask.py b/hikyuu/gui/data/ImportHistoryFinanceTask.py index b5d342d2..186aca4e 100644 --- a/hikyuu/gui/data/ImportHistoryFinanceTask.py +++ b/hikyuu/gui/data/ImportHistoryFinanceTask.py @@ -115,6 +115,13 @@ class ImportHistoryFinanceTask: old_md5 = hashlib.md5(f.read()).hexdigest() if old_md5 != item['hash']: self.download_file(item) + else: + # 不管是否有变化,都导入一次,以便切换引擎时可以导入 + shutil.unpack_archive(dest_file, extract_dir=self.dest_dir) + filename = item['filename'] + filename = f'{self.dest_dir}/{filename[0:-4]}.dat' + self.import_to_db(filename) + hku_info(f"Import finance file: {filename}") count += 1 self.queue.put([self.task_name, None, None, int(100 * count / self.total_count), self.total_count]) except Exception as e: diff --git a/hikyuu/gui/data/MainWindow.py b/hikyuu/gui/data/MainWindow.py index bed6eabd..b556a3a1 100644 --- a/hikyuu/gui/data/MainWindow.py +++ b/hikyuu/gui/data/MainWindow.py @@ -653,7 +653,7 @@ class Ui_MainWindow(object): "
导入深证分时数据:
\n" "导入权息数据数:
\n" "导入完毕!