Author: manolo
Date: 2012-12-29 06:14:41 -0800 (Sat, 29 Dec 2012)
New Revision: 9782
Log:
Display the moving insertion point when doing drag&drop to an 
fltk3::TextDisplay widget from the widget itself.

Modified:
   branches/branch-3.0/src/fltk3/TextDisplay.cxx

Modified: branches/branch-3.0/src/fltk3/TextDisplay.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/TextDisplay.cxx       2012-12-29 11:58:49 UTC 
(rev 9781)
+++ branches/branch-3.0/src/fltk3/TextDisplay.cxx       2012-12-29 14:14:41 UTC 
(rev 9782)
@@ -3478,12 +3478,14 @@
   }
   
   // draw the text cursor
+  int start, end;
+  int has_selection = buffer()->selection_position(&start, &end);
   if (damage() & (fltk3::DAMAGE_ALL | fltk3::DAMAGE_SCROLL | 
fltk3::DAMAGE_EXPOSE)
       && (
 #ifdef __APPLE__
          fltk3::marked_text_length() ||
 #endif
-         !buffer()->primary_selection()->selected()) &&
+         !has_selection || mCursorPos < start || mCursorPos > end) &&
       mCursorOn && fltk3::focus() == (fltk3::Widget*)this ) {
     fltk3::push_clip(text_area.x-LEFT_MARGIN,
                  text_area.y,

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to