Przeglądaj źródła

LibGUI: Reset GlyphMapWidget only if clicking a new active glyph

Fixes an edge case in which mousing down on the active glyph within
a larger selection would reset the selection but fail to update the
glyph map. Now we can grow or shrink the selection by dragging the
active glyph even after an initial selection is made.
thankyouverycool 3 lat temu
rodzic
commit
cf13cf7225
1 zmienionych plików z 1 dodań i 5 usunięć
  1. 1 5
      Userland/Libraries/LibGUI/GlyphMapWidget.cpp

+ 1 - 5
Userland/Libraries/LibGUI/GlyphMapWidget.cpp

@@ -167,12 +167,8 @@ void GlyphMapWidget::mousedown_event(MouseEvent& event)
         auto glyph = maybe_glyph.value();
         auto glyph = maybe_glyph.value();
         if (event.shift())
         if (event.shift())
             m_selection.extend_to(glyph);
             m_selection.extend_to(glyph);
-        else {
-            m_selection.set_size(1);
-            m_selection.set_start(glyph);
-        }
         m_in_drag_select = true;
         m_in_drag_select = true;
-        set_active_glyph(glyph, ShouldResetSelection::No);
+        set_active_glyph(glyph, event.shift() ? ShouldResetSelection::No : ShouldResetSelection::Yes);
     }
     }
 }
 }