FLTK logo

STR #3127

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.3 | SVN ⇄ GIT ]

STR #3127

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:1 - Request for Enhancement, e.g. asking for a feature
Scope:3 - Applies to all machines and operating systems
Subsystem:Core Library
Summary:Fl_Tree* needs a method to move() items around in the tree
Version:1.3-feature
Created By:greg.ercolano
Assigned To:greg.ercolano
Fix Version:1.3-feature (SVN: v10271)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 greg.ercolano
18:40 Sep 03, 2014
fltree-added-move-v2.patch
11k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 greg.ercolano
18:36 Sep 03, 2014
This would help add support for interactive drag+drop of tree items,
e.g. RFE (I) in STR# 2828.

Developer cand supplied recent patch that would benefit from this.
 
 
#2 greg.ercolano
18:40 Sep 03, 2014
Attaching patch fltree-added-move-v2.patch that implements 3 new methods:

    Fl_Menu_Item::move_above()   -- move current item above a specified item
    Fl_Menu_Item::move_below()   -- move current item below a specified item
    Fl_Menu_Item::move_into()    -- move current item into a specified item (as a child)

This should work against svn current, r10264.
 
 
#3 cand
02:55 Sep 04, 2014
The move_below and move_above functions have a bug when moving inside the same parent, and the new position is lower than the start position.

For example, try to move 111 below 222 (between 222 and 333). The _below and _above functions are used depending on which of the 222 or 333 you hover on.

The expected order is 222 -> 111 -> 333. The visible order is 222 -> 333 -> 111, buggy.

The functions correctly call 111->move_below(222) (or move_above(333)).
 
 
#4 greg.ercolano
03:35 Sep 04, 2014
Thanks, will check.

There's another problem I noticed in the patch where
during a move() within the same parent, neighboring
siblings before the move weren't having their prev/next_sibling
pointers re-adjusted.

Will fix both of this either in a follow up patch or commit.

(I didn't commit my patch because I didn't think it fully tested,
but figured your code would benefit from using the new methods
whose internals I could fix in subsequent patches.)
 
 
#5 greg.ercolano
11:58 Sep 04, 2014
Fixed in SVN.

Will follow up to investigate issue cand brought up in comment #3
of this STR.
 
 
#6 greg.ercolano
20:02 Sep 04, 2014
cand: OK, regarding the move above/below misbehavior you noticed,
please update to svn current (r10272), as I'm thinking that will
solve the issues you saw.

If you catch any weirdness, let me know.

I'll continue to do some boundary tests on the move ops
before I close this STR.
 
 
#7 greg.ercolano
13:15 Oct 27, 2014
Comment #6 should not be a show stopper for 1.3.3 release.  
 
#8 greg.ercolano
08:32 Apr 28, 2015
Fixed in Subversion repository.  
     

Return to Bugs & Features ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.