Fix bin item description cannot be edited if it contains zone subclips

BUG: 402817
parent dc13bd5e
Pipeline #373 passed with stage
in 8 minutes and 32 seconds
......@@ -1955,10 +1955,14 @@ void Bin::slotItemDoubleClicked(const QModelIndex &ix, const QPoint pos)
return;
}
} else {
if (item->count() > 0) {
QTreeView *view = static_cast<QTreeView *>(m_itemView);
view->setExpanded(ix, !view->isExpanded(ix));
return;
if (ix.column() == 0 && item->count() > 0) {
QRect IconRect = m_itemView->visualRect(ix);
IconRect.setWidth((double)IconRect.height() / m_itemView->iconSize().height() * m_itemView->iconSize().width());
if (!pos.isNull() && (IconRect.contains(pos) || pos.y() > (IconRect.y() + IconRect.height()/2))) {
QTreeView *view = static_cast<QTreeView *>(m_itemView);
view->setExpanded(ix, !view->isExpanded(ix));
return;
}
}
}
if (ix.isValid()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment