UI/Qt: Don't change LocationEdit cursor position on right click

Previously, right clicking highlighted text in the location bar would
cause the current selection to be lost.
This commit is contained in:
Tim Ledbetter 2024-09-09 23:06:11 +01:00 committed by Andreas Kling
parent dc18280f80
commit 6c608bac65
Notes: github-actions[bot] 2024-09-10 05:41:19 +00:00

View file

@ -73,9 +73,12 @@ void LocationEdit::focusOutEvent(QFocusEvent* event)
if (text().isEmpty()) if (text().isEmpty())
setText(qstring_from_ak_string(m_url.serialize())); setText(qstring_from_ak_string(m_url.serialize()));
} }
if (event->reason() != Qt::PopupFocusReason) {
setCursorPosition(0); setCursorPosition(0);
highlight_location(); highlight_location();
} }
}
void LocationEdit::update_placeholder() void LocationEdit::update_placeholder()
{ {