mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix "Copy Selected Text" appearing outside of selection.
This commit is contained in:
parent
3d8899b9dc
commit
1f95e00793
1 changed files with 11 additions and 11 deletions
|
@ -1568,10 +1568,11 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
|||
} else {
|
||||
isUponSelected = -2;
|
||||
}
|
||||
} else {
|
||||
} else if (App::mousedItem()
|
||||
&& App::mousedItem() == App::hoveredItem()
|
||||
&& _selected.cbegin()->first == App::mousedItem()->data()) {
|
||||
uint16 selFrom = _selected.cbegin()->second.from, selTo = _selected.cbegin()->second.to;
|
||||
hasSelected = (selTo > selFrom) ? 1 : 0;
|
||||
if (App::mousedItem() && App::mousedItem() == App::hoveredItem()) {
|
||||
auto mousePos = mapPointToItem(mapFromGlobal(_mousePosition), App::mousedItem());
|
||||
StateRequest request;
|
||||
request.flags |= Ui::Text::StateRequest::Flag::LookupSymbol;
|
||||
|
@ -1583,7 +1584,6 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (showFromTouch && hasSelected && isUponSelected < hasSelected) {
|
||||
isUponSelected = hasSelected;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue