Created
April 10, 2014 20:28
-
-
Save anaselli/10420056 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/NCTree.cc b/src/NCTree.cc | |
index 9c77a37..69a4124 100644 | |
--- a/src/NCTree.cc | |
+++ b/src/NCTree.cc | |
@@ -488,7 +488,31 @@ void NCTree::CreateTreeLines( NCTreeLine * parentLine, NCTreePad * pad, YItem * | |
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 ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment