修复状态机的部分异常、计数器编辑与预览更新、修复时间、轮班图元的高度多一行的问题

This commit is contained in:
2026-09-09 14:31:55 +08:00
parent 84e20a440c
commit 831fc0d639
18 changed files with 271 additions and 768 deletions
+14 -1
View File
@@ -104,7 +104,16 @@ QImage PicScheduleShiftItem::itemImage()
if(str.isEmpty()) {
return QImage();
}
return strToImage(str);
auto forceImg = strToImage(str);
QImage backgroundImg(m_maxSize.width(), forceImg.height(), QImage::Format_ARGB32);
backgroundImg.fill(0x00000000);
QPainter p;
p.begin(&backgroundImg);
p.drawImage(QPoint(0, 0), forceImg);
p.end();
return backgroundImg;
}
QSize PicScheduleShiftItem::calcMaxSize()
@@ -123,6 +132,10 @@ QSize PicScheduleShiftItem::calcMaxSize()
QRectF PicScheduleShiftItem::boundingRect() const
{
auto r = PicTextItem::boundingRect();
r.setWidth(m_maxSize.width());
return r;
if (!m_itemImage.isNull()) {
return QRectF(0, 0, m_itemImage.width(), m_itemImage.height());
}