mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Don't show empty popup menu in ListWidget.
This commit is contained in:
@@ -2527,6 +2527,10 @@ void ListWidget::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
|||||||
_overState));
|
_overState));
|
||||||
|
|
||||||
_menu = FillContextMenu(this, request);
|
_menu = FillContextMenu(this, request);
|
||||||
|
if (_menu->empty()) {
|
||||||
|
_menu = nullptr;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
using namespace HistoryView::Reactions;
|
using namespace HistoryView::Reactions;
|
||||||
const auto desiredPosition = e->globalPos();
|
const auto desiredPosition = e->globalPos();
|
||||||
@@ -3259,6 +3263,7 @@ void ListWidget::mouseActionUpdate() {
|
|||||||
view ? view->height() : 0,
|
view ? view->height() : 0,
|
||||||
itemPoint,
|
itemPoint,
|
||||||
view ? view->pointState(itemPoint) : PointState::Outside);
|
view ? view->pointState(itemPoint) : PointState::Outside);
|
||||||
|
_overItemExact = nullptr;
|
||||||
const auto viewChanged = (_overElement != view);
|
const auto viewChanged = (_overElement != view);
|
||||||
if (viewChanged) {
|
if (viewChanged) {
|
||||||
repaintItem(_overElement);
|
repaintItem(_overElement);
|
||||||
|
Reference in New Issue
Block a user