mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Don't show empty popup menu in ListWidget.
This commit is contained in:
parent
1953cc2f8a
commit
67d99355ca
1 changed files with 5 additions and 0 deletions
|
@ -2527,6 +2527,10 @@ void ListWidget::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
|||
_overState));
|
||||
|
||||
_menu = FillContextMenu(this, request);
|
||||
if (_menu->empty()) {
|
||||
_menu = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
using namespace HistoryView::Reactions;
|
||||
const auto desiredPosition = e->globalPos();
|
||||
|
@ -3259,6 +3263,7 @@ void ListWidget::mouseActionUpdate() {
|
|||
view ? view->height() : 0,
|
||||
itemPoint,
|
||||
view ? view->pointState(itemPoint) : PointState::Outside);
|
||||
_overItemExact = nullptr;
|
||||
const auto viewChanged = (_overElement != view);
|
||||
if (viewChanged) {
|
||||
repaintItem(_overElement);
|
||||
|
|
Loading…
Add table
Reference in a new issue