修复状态机的部分异常、计数器编辑与预览更新、修复时间、轮班图元的高度多一行的问题
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user