From 0b48bbdef2e5bc2afb0eed2bebcdd26c9ecec43e Mon Sep 17 00:00:00 2001 From: niksedk Date: Sun, 6 Nov 2011 22:21:06 +0000 Subject: [PATCH] Fixed de-selecting text in textbox via single click - thx XhmikosR :) git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@797 99eadd0c-20b8-1223-b5c4-2a2b2df33de2 --- src/Controls/SETextBox.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Controls/SETextBox.cs b/src/Controls/SETextBox.cs index e625b4565..196e7f80c 100644 --- a/src/Controls/SETextBox.cs +++ b/src/Controls/SETextBox.cs @@ -86,7 +86,13 @@ namespace Nikse.SubtitleEdit.Controls _dragFromThis = false; long milliseconds = (DateTime.Now.Ticks - _dragStartTicks) / 10000; if (milliseconds < 400) + { + SelectionLength = 0; + if (index == Text.Length - 1 && index > 0) + index++; + SelectionStart = index; return; // too fast - nobody can drag'n'drop this fast + } if (index >= _dragStartFrom && index <= _dragStartFrom + _dragText.Length) return; // don't drop same text at same position