Qt4 Accounting View Port: Bounding Rectangle Error in Non-Accounting
Views
Phil Weintein, 12-30-2010
I had noticed that SimObj icons in the Simulation and Geospatial Views were draggable only when clicking on the Icon or the Right Side of the label. "Annotating" the Shape and BoundingRect areas showed that there was a problem with the SimObj graphics items' bounding rectangle.
(The code to do this painting is shown below).
void SimObjGfxItem::paint (QPainter* painter, const QStyleOptionGraphicsItem* options, QWidget* widget /*=NULL*/) ... ... ... painter->setPen (QPen (Qt::black)); // Show the custom "bounding rectangle" area. QRectF boundRect = boundingRect(); painter->fillRect (boundRect, QBrush (Qt::yellow)); painter->drawRect (boundRect); // Show the custom "shape" area. QPainterPath shapePath = shape(); painter->fillPath (shapePath, QBrush (Qt::red)); painter->drawPath (shapePath); |
Confirmation of Fix with the Geospatial View's five different
label configurations:
-- see code change notes.
---