QXYSeries: properly handle selected points in replace(QList<QPointF>)


The replace() overload taking a list of points did not consider the
fact that the new list can be shorter than the original.
If some points were selected before the replace() call, and there
are no points with such indexes in the new list, then selectedPoints()
was still reporting non-existent indexes.

This patch updates the logic of replace(QList<QPointF>) to also make
sure that all the non-existent indexes are removed from the set
that keeps track of the selected points.

Amends 86f3ac473a3583a9103838a77c39b516b6f139b5.

Fixes: QTBUG-132790
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: Ief1d1791d09302b4f22ff65c978f6f7d60741ee3
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
commit159994409d7669b9d37e6e8aaebe67646267cedb
parentd52ca5a49d30ee026043735f617fdd2604627fed
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeThu, 5 Jun 2025 11:08:59 +0200