mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:22:45 +00:00 
			
		
		
		
	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.
This commit is contained in:
		
							parent
							
								
									360e58a276
								
							
						
					
					
						commit
						12cd30f1ac
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -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) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 thankyouverycool
						thankyouverycool