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

QGraphicsScene::clearSelection removes from selectedItems items with overridden selection state change (ItemSelectedChange)

    XMLWordPrintable

Details

    Description

      QGraphicsScene::clearSelection removes items returning true in itemChange(ItemSelectedChange, value) from list of selected items (QGraphicsScene::selectedItems). This leaves scene in an inconsistent state, items are selected (isSelected()==true) but selectedItems is empty. Only items with isSelected()==false should be removed from selectedItems.

      Appropriate test case is in the attachment.

      Attachments

        1. TestOverrideSelectedItem.cpp
          2 kB
          Maciej Krol
        2. TestOverrideSelectedItem.pro
          0.1 kB
          Maciej Krol
        3. qgraphicsscene_clearSelection.cpp
          2 kB
          Maciej Krol
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bjnilsen Bjørn Erik Nilsen
            mackrol Maciej Krol
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes