修复状态机的部分异常、计数器编辑与预览更新、修复时间、轮班图元的高度多一行的问题
This commit is contained in:
+19
-8
@@ -298,8 +298,24 @@ void InkJetPrinter::showEvent(QShowEvent *e)
|
||||
QWidget::showEvent(e);
|
||||
|
||||
if(firstShow) {
|
||||
loadLastWorkAndPreparePrint();
|
||||
|
||||
firstShow = false;
|
||||
|
||||
static QTimer* fpgaReadyTimer = new QTimer(this);
|
||||
fpgaReadyTimer->setInterval(1000);
|
||||
connect(fpgaReadyTimer, &QTimer::timeout, this, [this](){
|
||||
if(sysPara->status.build_dat.builTime != 0) {
|
||||
loadLastWorkAndPreparePrint();
|
||||
fpgaReadyTimer->stop();
|
||||
fpgaReadyTimer->deleteLater();
|
||||
fpgaReadyTimer = nullptr;
|
||||
}
|
||||
else {
|
||||
qDebug() << "FPGA not connected yet.";
|
||||
}
|
||||
});
|
||||
|
||||
fpgaReadyTimer->start();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1011,7 +1027,7 @@ void InkJetPrinter::timerHandler(void){
|
||||
arg((MAX_SELF_CHECK_CNT - sysPara->status.selfCheckCnt)/100));
|
||||
}
|
||||
#ifdef QT_DEBUG
|
||||
if(sysPara->status.selfCheckCnt >= 1500) // 测试自检改为15s
|
||||
if(sysPara->status.selfCheckCnt >= 500) // 测试自检改为15s
|
||||
#else
|
||||
if(sysPara->status.selfCheckCnt >= MAX_SELF_CHECK_CNT)
|
||||
#endif
|
||||
@@ -2932,12 +2948,7 @@ bool InkJetPrinter::loadWorkFileAndPreparePrint(const QString &filename)
|
||||
}
|
||||
|
||||
PrintSettingModel::applyToSysPara(model, sysPara);
|
||||
|
||||
// 应用完数据之后,将当前值编辑标志位清除,避免下次读取时为 true
|
||||
model.cnt1Settings.editCurrValue = false;
|
||||
model.cnt2Settings.editCurrValue = false;
|
||||
PicSceneLoader::saveSceneToXmlFile(filename, scene, &model);
|
||||
|
||||
|
||||
ret = m_MainWidget->generatePrintContent(scene);
|
||||
if(!ret) {
|
||||
LogInfo::setRunStatusText(QString("Failed to generate print content from work file: %1").arg(filename));
|
||||
|
||||
Reference in New Issue
Block a user