summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorthankyouverycool <66646555+thankyouverycool@users.noreply.github.com>2022-12-15 12:03:07 -0500
committerAndreas Kling <kling@serenityos.org>2022-12-20 10:22:27 +0100
commit12cd30f1acd6bccfba07d3054d71feb0467a3d78 (patch)
tree8714156bff5139fd2f337d9bdcc3e87e711390d0 /Userland
parent360e58a276e4dd79e15430ff012054c690d9f0e5 (diff)
downloadserenity-12cd30f1acd6bccfba07d3054d71feb0467a3d78.zip
LibGUI: Ensure GlyphMapWidget selection resets when requested
Previously selection reset was ignored on active glyph change if the old glyph equaled the new one. This was an intentional behavior that allowed selections to resize by dragging the focused glyph, but has proved more counterintuitive than useful. Now the widget behaves like other text selection controls: selections can be reset by clicking anywhere in them or shift can be held to grow the selection.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibGUI/GlyphMapWidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/GlyphMapWidget.cpp b/Userland/Libraries/LibGUI/GlyphMapWidget.cpp
index be2ca8a094..9157ebda58 100644
--- a/Userland/Libraries/LibGUI/GlyphMapWidget.cpp
+++ b/Userland/Libraries/LibGUI/GlyphMapWidget.cpp
@@ -77,7 +77,7 @@ void GlyphMapWidget::resize_event(ResizeEvent& event)
void GlyphMapWidget::set_active_glyph(int glyph, ShouldResetSelection should_reset_selection)
{
- if (m_active_glyph == glyph)
+ if (m_active_glyph == glyph && should_reset_selection == ShouldResetSelection::No)
return;
m_active_glyph = glyph;
if (should_reset_selection == ShouldResetSelection::Yes) {