Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-10817

minor improvement for qgraphicsitem

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P3: Somewhat important
    • 4.7.1
    • 4.6.2
    • Widgets: GraphicsView
    • None
    • qt4.6.2

    • 72a1709cbe216220722750c743641bf5ba8a8da9

    Description

      RC: ou1cimx1#421902

      in void QGraphicsItem::update(const QRectF &rect)

      { ..... ....... ........ if (d_ptr->discardUpdateRequest()) ---à we are checking if we need to discard the update request return; if (d_ptr->scene) d_ptr->scene->d_func()->markDirty(this, rect); -à we call mark dirty }

      }

      void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, bool invalidateChildren,

      bool force, bool ignoreOpacity, bool removingItemFromScene)

      {

      Q_ASSERT(item);

      if (updateAll)

      return;

      if (item->d_ptr->discardUpdateRequest(/ignoreVisibleBit=/force,

      /ignoreDirtyBit=/removingItemFromScene || invalidateChildren,

      /ignoreOpacity=/ignoreOpacity)) { --àwe basically do the same here

      if (item->d_ptr->dirty)

      { // The item is already marked as dirty and will be processed later. However, // we have to make sure ignoreVisible and ignoreOpacity are set properly; // otherwise things like: item->update(); item->hide() (force is now true) // won't work as expected. if (force) item->d_ptr->ignoreVisible = 1; if (ignoreOpacity) item->d_ptr->ignoreOpacity = 1; }

      return;

      }

      ...................

      ....................

      }

      Do we need to check twice the discardupdateRequest??(We do opacity related calculations here), I mean when item is in scene.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bjnilsen Bjørn Erik Nilsen
            kalyanreddy2005 Kalyan kondapally
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes