0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-02 19:56:58 +03:00

Layout has been fixed

This commit is contained in:
Arin Alexander
2019-01-21 14:17:34 +03:00
parent 651367e6a3
commit 76ae6dfb24
5 changed files with 12 additions and 11 deletions

View File

@@ -1026,6 +1026,7 @@ QVariant BaseDesignIntf::itemChange(QGraphicsItem::GraphicsItemChange change, co
if (change == QGraphicsItem::ItemPositionHasChanged) {
updateSelectionMarker();
}
if (change == QGraphicsItem::ItemSelectedChange) {
turnOnSelectionMarker(value.toBool());
emit itemSelectedHasBeenChanged(this, value.toBool());
@@ -1120,18 +1121,18 @@ void BaseDesignIntf::setItemPos(const QPointF &newPos)
QPointF oldPos = pos();
QPointF finalPos = modifyPosForAlignedItem(newPos);
QGraphicsItem::setPos(finalPos);
emit posChanged(this, finalPos, oldPos);
emit posChanging(this, finalPos, oldPos);
}
void BaseDesignIntf::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
QGraphicsItem::mouseReleaseEvent(event);
QRectF newGeometry = geometry();
if (newGeometry != m_oldGeometry) {
geometryChangedEvent(newGeometry, m_oldGeometry);
updateSelectionMarker();
emit(geometryChanged(this, newGeometry, m_oldGeometry));
emit(posChanged(this, newGeometry.topLeft(), m_oldGeometry.topLeft()));
}
QGraphicsItem::mouseReleaseEvent(event);
}
void BaseDesignIntf::showEditorDialog(){