How to reproduce the bug:
- starting with the Gantt Project example, add a "zoom fit" entry in the menu, add the zoomFit() algorithm from the Gant Legend example
- Change the model of the project to change the row size:
if (idx.column() == 0) {
switch (role) {
case Qt::SizeHintRole:
return QSize(100, 60);
Fix:
There are two paths to update the Gantt items (which is bad). The faulty path (GraphicsScene::updateItems()) does not take in account the row size:
Replace:
item->updateItem(Span(item->pos().y(), item->rect().height()), idx);
With:
const QModelIndex sidx = summaryHandlingModel()->mapToSource(idx);
Span rg = rowController()->rowGeometry(sidx);
item->updateItem(rg, idx);