Tweak x11/fpc-x11 version 3.0.2
[dports.git] / x11-toolkits / fltk / files / patch-src_Fl__Tree__Item.cxx
1 ------------------------------------------------------------------------
2 r10699 | greg.ercolano | 2015-04-13 16:55:27 +0000 (Mon, 13 Apr 2015) | 3 lines
3
4 Fix return value test, as pointed out by Albrecht.
5
6 --- src/Fl_Tree_Item.cxx.orig   2014-09-05 02:59:00 UTC
7 +++ src/Fl_Tree_Item.cxx
8 @@ -549,7 +549,7 @@ int Fl_Tree_Item::move(Fl_Tree_Item *ite
9    } else {                                     // different parent?
10      if ( to > to_parent->children() )          // try to prevent a reparent() error
11        return -4;
12 -    if ( from_parent->deparent(from) < 0 )     // deparent self from current parent
13 +    if ( from_parent->deparent(from) == NULL ) // deparent self from current parent
14        return -5;
15      if ( to_parent->reparent(this, to) < 0 ) { // reparent self to new parent at position 'to'
16        to_parent->reparent(this, 0);            // failed? shouldn't happen, reparent at 0