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,8 +73,11 @@ void LocationEdit::focusOutEvent(QFocusEvent* event)
if (text().isEmpty())
setText(qstring_from_ak_string(m_url.serialize()));
}
setCursorPosition(0);
highlight_location();
if (event->reason() != Qt::PopupFocusReason) {
setCursorPosition(0);
highlight_location();
}
}
void LocationEdit::update_placeholder()