[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haiku-commits
Subject:    [Haiku-commits] r30928 - haiku/trunk/src/kits/interface
From:       zooey at BerliOS <zooey () mail ! berlios ! de>
Date:       2009-05-30 17:27:04
Message-ID: 200905301727.n4UHR4Eo021367 () sheep ! berlios ! de
[Download RAW message or body]

Author: zooey
Date: 2009-05-30 19:27:03 +0200 (Sat, 30 May 2009)
New Revision: 30928
ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=30928&view=rev

Modified:
   haiku/trunk/src/kits/interface/TextView.cpp
Log:
Fixed bug in BTextView reported by Matt:
* when selecting via mouse, the caret position now follows the direction of
  the selection - which is less surprising than not moving the caret at all

Modified: haiku/trunk/src/kits/interface/TextView.cpp
===================================================================
--- haiku/trunk/src/kits/interface/TextView.cpp	2009-05-30 17:21:10 UTC (rev 30927)
+++ haiku/trunk/src/kits/interface/TextView.cpp	2009-05-30 17:27:03 UTC (rev 30928)
@@ -4564,6 +4564,12 @@
 			break;
 	}
 
+	// position caret to follow the direction of the selection
+	if (fTrackingMouse->selEnd != fSelEnd)
+		fClickOffset = fTrackingMouse->selEnd;
+	else if (fTrackingMouse->selStart != fSelStart)
+		fClickOffset = fTrackingMouse->selStart;
+
 	Select(fTrackingMouse->selStart, fTrackingMouse->selEnd);
 	_TrackMouse(where, NULL);
 

_______________________________________________
Haiku-commits mailing list
Haiku-commits@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/haiku-commits

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic