Browse Source

Text widgets should not draw the cursor when selecting text

Michael Ragazzon 1 year ago
parent
commit
f084efb75f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/Core/Elements/WidgetTextInput.cpp

+ 1 - 1
Source/Core/Elements/WidgetTextInput.cpp

@@ -472,7 +472,7 @@ void WidgetTextInput::OnRender()
 	Vector2f text_translation = parent->GetAbsoluteOffset() - Vector2f(parent->GetScrollLeft(), parent->GetScrollTop());
 	Vector2f text_translation = parent->GetAbsoluteOffset() - Vector2f(parent->GetScrollLeft(), parent->GetScrollTop());
 	selection_composition_geometry.Render(text_translation);
 	selection_composition_geometry.Render(text_translation);
 
 
-	if (cursor_visible && !parent->IsDisabled())
+	if (cursor_visible && selection_length <= 0 && !parent->IsDisabled())
 	{
 	{
 		cursor_geometry.Render(text_translation + cursor_position);
 		cursor_geometry.Render(text_translation + cursor_position);
 	}
 	}