On 11/26/12 22:32, corvid wrote:
> Greg wrote:
>>      In order to retain the user's ability to deselect equally from both
>>      keyboard and mouse, IMHO Fl_Tree should be changed so that CTRL-CLICK
>>      toggles just like CTRL-SPACE.
>>
>>      Curious what you think.
> 
> Sounds good to me.
> Thanks!

        Suggesting this patch against 1.3.1 + svn current.
        Let me know if this works for you.

Index: Fl_Tree.cxx
===================================================================
--- Fl_Tree.cxx (revision 9732)
+++ Fl_Tree.cxx (working copy)
@@ -337,7 +337,11 @@
            case FL_TREE_SELECT_NONE:
              break;
            case FL_TREE_SELECT_SINGLE:
-             select_only(item, when());
+             if ( is_ctrl ) {                  // CTRL+LEFT-CLICK?
+               select_toggle(item, when());    // toggle
+             } else {                          // LEFT-CLICK?
+               select_only(item, when());      // select only this item
+             }
              _lastselect = item;
              break;
            case FL_TREE_SELECT_MULTI: {
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to