Fixed moving labels and added warning icon to detail dialog when detail name is empty
--HG-- branch : feature
This commit is contained in:
parent
5aa75f2aff
commit
6e1dce0cd7
|
@ -257,11 +257,15 @@ void DialogDetail::NameDetailChanged()
|
|||
{
|
||||
flagName = false;
|
||||
ChangeColor(labelEditNamePoint, Qt::red);
|
||||
QIcon icon(":/icons/win.icon.theme/16x16/status/dialog-warning.png");
|
||||
ui.tabWidget->setTabIcon(1, icon);
|
||||
}
|
||||
else
|
||||
{
|
||||
flagName = true;
|
||||
ChangeColor(labelEditNamePoint, okColor);
|
||||
QIcon icon;
|
||||
ui.tabWidget->setTabIcon(1, icon);
|
||||
}
|
||||
}
|
||||
CheckState();
|
||||
|
|
|
@ -242,11 +242,16 @@ void VTextGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* pME)
|
|||
QPointF pt = m_ptStartPos + ptDiff;
|
||||
pt.setX(pt.x() + m_rectBoundingBox.width()/2);
|
||||
pt.setY(pt.y() + m_rectBoundingBox.height()/2);
|
||||
if (parentItem()->boundingRect().contains(pt) == true)
|
||||
QRectF rectBB = parentItem()->boundingRect();
|
||||
if (rectBB.contains(pt) == false)
|
||||
{
|
||||
setPos(m_ptStartPos + ptDiff);
|
||||
UpdateBox();
|
||||
pt.setX(qMin(rectBB.right(), qMax(pt.x(), rectBB.left())));
|
||||
pt.setY(qMin(rectBB.bottom(), qMax(pt.y(), rectBB.top())));
|
||||
}
|
||||
pt.setX(pt.x() - m_rectBoundingBox.width()/2);
|
||||
pt.setY(pt.y() - m_rectBoundingBox.height()/2);
|
||||
setPos(pt);
|
||||
UpdateBox();
|
||||
}
|
||||
else if (m_eMode == mResize)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user