修复RFID导致回收槽关闭;修复新建文件后不自动切换的问题
This commit is contained in:
+9
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user