Commit 3148e662 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix double clicking a title clip in bin tries to rename instead of opening the title dialog

parent 68556dbd
...@@ -1951,8 +1951,8 @@ void Bin::slotItemDoubleClicked(const QModelIndex &ix, const QPoint pos) ...@@ -1951,8 +1951,8 @@ void Bin::slotItemDoubleClicked(const QModelIndex &ix, const QPoint pos)
} }
if (ix.isValid()) { if (ix.isValid()) {
QRect IconRect = m_itemView->visualRect(ix); QRect IconRect = m_itemView->visualRect(ix);
IconRect.setSize(m_itemView->iconSize()); IconRect.setWidth((double)IconRect.height() / m_itemView->iconSize().height() * m_itemView->iconSize().width());
if (!pos.isNull() && ((ix.column() == 2 && item->itemType() == AbstractProjectItem::ClipItem) || !IconRect.contains(pos))) { if (!pos.isNull() && ((ix.column() == 2 && item->itemType() == AbstractProjectItem::ClipItem) || (!IconRect.contains(pos) && pos.y() < (IconRect.y() + IconRect.height()/2)))) {
// User clicked outside icon, trigger rename // User clicked outside icon, trigger rename
m_itemView->edit(ix); m_itemView->edit(ix);
return; return;
......
Supports Markdown
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