Hello community, here is the log from the commit of package libyui-ncurses for openSUSE:Factory checked in at 2016-10-18 13:27:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libyui-ncurses (Old) and /work/SRC/openSUSE:Factory/.libyui-ncurses.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libyui-ncurses" Changes: -------- --- /work/SRC/openSUSE:Factory/libyui-ncurses/libyui-ncurses.changes 2016-02-08 09:47:20.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libyui-ncurses.new/libyui-ncurses.changes 2016-10-18 13:27:30.000000000 +0200 @@ -1,0 +2,7 @@ +Fri Oct 14 10:30:15 CEST 2016 - anase...@linux.it + +- Fix pre-selecting a tree item when adding it, in ncurses + (gh#libyui-ncurses/issues#26). The very first item would be + selected, ignoring YTreeItem::setSelected + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ libyui-ncurses.spec: same change ++++++ libyui-ncurses-2.47.6.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-ncurses-2.47.6/package/libyui-ncurses.changes new/libyui-ncurses-2.47.6/package/libyui-ncurses.changes --- old/libyui-ncurses-2.47.6/package/libyui-ncurses.changes 2016-01-29 16:10:08.000000000 +0100 +++ new/libyui-ncurses-2.47.6/package/libyui-ncurses.changes 2016-10-14 12:15:10.000000000 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Oct 14 10:30:15 CEST 2016 - anase...@linux.it + +- Fix pre-selecting a tree item when adding it, in ncurses + (gh#libyui-ncurses/issues#26). The very first item would be + selected, ignoring YTreeItem::setSelected + +------------------------------------------------------------------- Thu Jan 28 08:52:37 CET 2016 - g...@suse.de - replace deprecated auto_ptr by unique_ptr (bsc#962744) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-ncurses-2.47.6/src/NCTree.cc new/libyui-ncurses-2.47.6/src/NCTree.cc --- old/libyui-ncurses-2.47.6/src/NCTree.cc 2016-01-29 16:10:08.000000000 +0100 +++ new/libyui-ncurses-2.47.6/src/NCTree.cc 2016-10-14 12:15:10.000000000 +0200 @@ -489,6 +489,29 @@ NCTreeLine * line = new NCTreeLine( parentLine, treeItem, multiSel ); pad->Append( line ); + if (item->selected()) + { + //retrieve position of item + int at = treeItem->index(); + NCTreeLine * cline = 0; // current line + NCTableCol * ccol = 0; // current column + if ( multiSel ) + { + cline = modifyTreeLine( at ); + if ( cline ) + { + ccol = cline->GetCol(0); + } + if ( ccol ) + { + ccol->SetLabel( NCstring( std::string( cline->Level() + 3, ' ' ) + "[x] " + + item->label() ) ); + } + } + //this highlights selected item, possibly unpacks the tree + //should it be in currently hidden branch + pad->ShowItem( getTreeLine( at ) ); + } // iterate over children for ( YItemIterator it = item->childrenBegin(); it < item->childrenEnd(); ++it )