QCustomPlot Discussion and Comments

QCPItem selection in 2.0.0Return to overview

selection of QCPItems plotted below filled QCPItemRects no longer seems to work in the same way as it did in previous versions. The code below inserted into interaction-example/mainwindow.cpp at line 34 (version 1.32) or line 37 (version 2.0.0-beta) produces different results - the graphs under the rectangle are only selectable in version 1.32. Perhaps I missed a change in the API?

Thanks

  QCPItemRect* activeDuration = new QCPItemRect(ui->customPlot);
  activeDuration->topLeft->setTypeX(QCPItemPosition::ptAxisRectRatio);
  activeDuration->topLeft->setTypeY(QCPItemPosition::ptAxisRectRatio);
  activeDuration->topLeft->setAxes(ui->customPlot->xAxis, ui->customPlot->yAxis);
  activeDuration->topLeft->setAxisRect(ui->customPlot->axisRect());
  activeDuration->bottomRight->setTypeX(QCPItemPosition::ptAxisRectRatio);
  activeDuration->bottomRight->setTypeY(QCPItemPosition::ptAxisRectRatio);
  activeDuration->bottomRight->setAxes(ui->customPlot->xAxis, ui->customPlot->yAxis);
  activeDuration->bottomRight->setAxisRect(ui->customPlot->axisRect());
  activeDuration->topLeft->setCoords(.25,.25);
  activeDuration->bottomRight->setCoords(.75,.75);
  activeDuration->setBrush(QBrush(QColor(100,100,100,100)));

Can anyone reproduce this one?