修复RFID导致回收槽关闭;修复新建文件后不自动切换的问题

This commit is contained in:
2026-07-23 08:37:12 +08:00
parent 50c4999d90
commit f1ae7ae898
5 changed files with 770 additions and 77 deletions
+9 -1
View File
@@ -1522,8 +1522,16 @@ void InkJetPrinter::getMainWidgetButtonClickedSlot(int index)
switch (index)
{
case 1: { // 编辑当前文件
m_TestPrintWidget->openWorkFile(sysPara->para.lastOpenedFileName);
// 如果上次打开的文件不存在或者不是xml文件,则创建一个新的作业文件
QFileInfo fileInfo(sysPara->para.lastOpenedFileName);
if(!fileInfo.exists() || fileInfo.suffix() != "xml"){
createNewJobFile();
break;
}
// 如果上次打开的文件存在且是xml文件,则直接打开该文件
m_TestPrintWidget->openWorkFile(sysPara->para.lastOpenedFileName);
ui.label_currEditFile->setText(QString("E: %1").arg(fileInfo.baseName()));
m_StackedWidget->setCurrentWidget(m_TestPrintWidget);
break;