Skip to content

Commit

Permalink
Only apply the icon/diagram map on the primitive shapes
Browse files Browse the repository at this point in the history
Fixes ticket:5907 correctly draw the inherited connections
  • Loading branch information
adeas31 committed Apr 6, 2020
1 parent 761b5de commit 034e66b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions OMEdit/OMEditLIB/Annotations/ShapeAnnotation.cpp
Expand Up @@ -606,8 +606,8 @@ void ShapeAnnotation::applyFillPattern(QPainter *painter)

QList<QPointF> ShapeAnnotation::getExtentsForInheritedShapeFromIconDiagramMap(GraphicsView *pGraphicsView, ShapeAnnotation *pReferenceShapeAnnotation)
{
QPointF defaultPoint1 = QPointF(-100.0, -100.0);
QPointF defaultPoint2 = QPointF(100.0, 100.0);
QPointF defaultPoint1 = QPointF(pGraphicsView->mMergedCoOrdinateSystem.getLeft(), pGraphicsView->mMergedCoOrdinateSystem.getBottom());
QPointF defaultPoint2 = QPointF(pGraphicsView->mMergedCoOrdinateSystem.getRight(), pGraphicsView->mMergedCoOrdinateSystem.getTop());
QPointF point1 = defaultPoint1;
QPointF point2 = defaultPoint2;

Expand Down Expand Up @@ -666,6 +666,12 @@ void ShapeAnnotation::applyTransformation()
setTransform(mTransformation.getTransformationMatrix());

QPointF origin = mOrigin;

// Only apply the extends coordinate extents on the shapes and not on connection, transition etc.
LineAnnotation *pLineAnnotation = dynamic_cast<LineAnnotation*>(this);
if (pLineAnnotation && pLineAnnotation->getLineType() != LineAnnotation::ShapeType) {
return;
}
// if the extends have some new coordinate extents then use it to scale the shape
if (mpReferenceShapeAnnotation && mpReferenceShapeAnnotation->getGraphicsView()) {
QList<QPointF> extendsCoOrdinateExtents = getExtentsForInheritedShapeFromIconDiagramMap(mpGraphicsView, mpReferenceShapeAnnotation);
Expand Down

0 comments on commit 034e66b

Please sign in to comment.