Short Description: Qt4 Accounting View: Account QGraphicsItem Optimization Bug Number: n/a Release notes (y/n): no, not yet. For Release Nums: 6.1 Cache the AccountGfxItem's computed QPainterPath 'shape'. -------------------------- QtUtils/AccountGfxItem.hpp QtUtils/AccountGfxItem.cpp -------------------------- Maintain a computed copy of the QPainterPath 'shape', used both for drawing the background and for the QGraphicsItem::shape() virtual method (used for Qt's collision detection and hit tests). New data member: mutable QPainterPath _shapePath; New private method: void computeShapePath() const; // computes 'mutable' QPainterPath field. Note that this new method is 'const' so that it can be called from our reimplementation of QGraphicsItem::shape() const. In fact, computeShapePath() is called only the first time the AccountGfxItem becomes visible (actually drawn). ALSO: Minor tweak: Use a little more horizontal space for the label in Diversion Account items. (0.7 changed to 0.8): const double typeSpecificMidWidth = (acctTypeId == DIVERSION_ACCOUNT_ID) ? (0.8 * width()) : double (width()); ---