[FIX]【文件管理器】文件名有三行时,右键点击文件名的底部,文件选中状态消失[LINK]bug#114864

This commit is contained in:
likehomedream 2022-09-01 13:49:25 +08:00 committed by Yue-Lan
parent 83f3024f6d
commit 8ea037a349
3 changed files with 9 additions and 1 deletions

View File

@ -393,6 +393,10 @@ void IconViewIndexWidget::mousePressEvent(QMouseEvent *e)
// return;
// }
}
if(e->button() == Qt::RightButton){
e->accept();
return;
}
QWidget::mousePressEvent(e);
}

View File

@ -899,7 +899,7 @@ void IconView2::bindModel(FileItemModel *model, FileItemProxyFilterSortModel *pr
m_view->viewport()->repaint();
}
if (!m_view->indexAt(pos).isValid())
if (!m_view->indexAt(pos).isValid() && !m_view->indexWidget(m_view->currentIndex())->geometry().contains(pos))
m_view->clearSelection();
//NOTE: we have to ensure that we have cleared the

View File

@ -245,6 +245,10 @@ void DesktopIndexWidget::mousePressEvent(QMouseEvent *event)
// return;
// }
}
if(event->button() == Qt::RightButton){
event->accept();
return;
}
QWidget::mousePressEvent(event);
}