Changeset e1105bf in OpenModelica


Ignore:
Timestamp:
2020-09-08T13:14:16+02:00 (4 years ago)
Author:
Adeel Asghar <adeel.asghar@…>
Branches:
Added-citation-metadata, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, maintenance/v1.23, master, omlib-staging
Children:
2bb77f3, 976110cd
Parents:
818a8f24
git-author:
Adeel Asghar <adeel.asghar@…> (09/08/20 12:35:41)
git-committer:
Adeel Asghar <adeel.asghar@…> (09/08/20 13:14:16)
Message:

Apply the transformation on the graphical items inside the elements

Fixes wrong display of bitmaps. Ticket:6066

Location:
OMEdit/OMEditLIB/Annotations
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • OMEdit/OMEditLIB/Annotations/BitmapAnnotation.cpp

    r327c277 re1105bf  
    5959  mpOriginItem = 0;
    6060  updateShape(pShapeAnnotation);
    61   setPos(mOrigin);
    62   setRotation(mRotation);
     61  applyTransformation();
    6362}
    6463
  • OMEdit/OMEditLIB/Annotations/EllipseAnnotation.cpp

    r327c277 re1105bf  
    5656  mpOriginItem = 0;
    5757  updateShape(pShapeAnnotation);
    58   setPos(mOrigin);
    59   setRotation(mRotation);
     58  applyTransformation();
    6059}
    6160
  • OMEdit/OMEditLIB/Annotations/LineAnnotation.cpp

    re15e9e2 re1105bf  
    9999  setOMSConnectionType(oms_connection_single);
    100100  setActiveState(false);
    101   setPos(mOrigin);
    102   setRotation(mRotation);
     101  applyTransformation();
    103102}
    104103
  • OMEdit/OMEditLIB/Annotations/PolygonAnnotation.cpp

    r327c277 re1105bf  
    5656  mpOriginItem = 0;
    5757  updateShape(pShapeAnnotation);
    58   setPos(mOrigin);
    59   setRotation(mRotation);
     58  applyTransformation();
    6059}
    6160
  • OMEdit/OMEditLIB/Annotations/RectangleAnnotation.cpp

    r327c277 re1105bf  
    5656  mpOriginItem = 0;
    5757  updateShape(pShapeAnnotation);
    58   setPos(mOrigin);
    59   setRotation(mRotation);
     58  applyTransformation();
    6059}
    6160
  • OMEdit/OMEditLIB/Annotations/ShapeAnnotation.cpp

    r1a785313 re1105bf  
    676676  // if the extends have some new coordinate extents then use it to scale the shape
    677677  LineAnnotation *pLineAnnotation = dynamic_cast<LineAnnotation*>(this);
    678   if (!(pLineAnnotation && pLineAnnotation->getLineType() != LineAnnotation::ShapeType) && mpReferenceShapeAnnotation && mpReferenceShapeAnnotation->getGraphicsView()) {
    679     QList<QPointF> extendsCoOrdinateExtents = getExtentsForInheritedShapeFromIconDiagramMap(mpGraphicsView, mpReferenceShapeAnnotation);
    680 
    681     qreal left = mpGraphicsView->mMergedCoOrdinateSystem.getLeft();
    682     qreal bottom = mpGraphicsView->mMergedCoOrdinateSystem.getBottom();
    683     qreal right = mpGraphicsView->mMergedCoOrdinateSystem.getRight();
    684     qreal top = mpGraphicsView->mMergedCoOrdinateSystem.getTop();
     678  GraphicsView *pGraphicsView = mpGraphicsView ? mpGraphicsView : mpReferenceShapeAnnotation->getGraphicsView();
     679  if (pGraphicsView && !(pLineAnnotation && pLineAnnotation->getLineType() != LineAnnotation::ShapeType) && mpReferenceShapeAnnotation && mpReferenceShapeAnnotation->getGraphicsView()) {
     680    QList<QPointF> extendsCoOrdinateExtents = getExtentsForInheritedShapeFromIconDiagramMap(pGraphicsView, mpReferenceShapeAnnotation);
     681
     682    qreal left = pGraphicsView->mMergedCoOrdinateSystem.getLeft();
     683    qreal bottom = pGraphicsView->mMergedCoOrdinateSystem.getBottom();
     684    qreal right = pGraphicsView->mMergedCoOrdinateSystem.getRight();
     685    qreal top = pGraphicsView->mMergedCoOrdinateSystem.getTop();
    685686    // map the origin to extends CoOrdinateSystem
    686687    origin.setX(Utilities::mapToCoOrdinateSystem(mOrigin.x(), left, right, extendsCoOrdinateExtents.at(0).x(), extendsCoOrdinateExtents.at(1).x()));
  • OMEdit/OMEditLIB/Annotations/TextAnnotation.cpp

    r327c277 re1105bf  
    6868  updateShape(pShapeAnnotation);
    6969  initUpdateTextString();
    70   setPos(mOrigin);
    71   setRotation(mRotation);
     70  applyTransformation();
    7271}
    7372
Note: See TracChangeset for help on using the changeset viewer.