UI/Qt: Move cursor to the front

Fix long URLs showing the end instead of domain
This commit is contained in:
Sidicer
2024-08-17 03:28:28 +03:00
committed by Tim Ledbetter
parent e926b4cbfb
commit c380dcf15e

View File

@@ -73,6 +73,7 @@ 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()));
} }
setCursorPosition(0);
highlight_location(); highlight_location();
} }
@@ -134,6 +135,7 @@ void LocationEdit::set_url(URL::URL const& url)
clear(); clear();
} else { } else {
setText(qstring_from_ak_string(url.serialize())); setText(qstring_from_ak_string(url.serialize()));
setCursorPosition(0);
} }
} }