mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-29 01:07:58 +01:00
Merge branch 'tree-view' of https://github.com/tznind/gui.cs into tree-view
This commit is contained in:
@@ -1079,17 +1079,17 @@ namespace Terminal.Gui {
|
||||
{
|
||||
var map = BuildLineMap();
|
||||
|
||||
if(SelectedObject != null)
|
||||
yield return SelectedObject;
|
||||
|
||||
// To determine multi selected objects, start with the line map, that avoids yielding hidden nodes that were selected then the parent collapsed e.g. programmatically or with mouse click
|
||||
if(MultiSelect){
|
||||
foreach(var m in map.Select(b=>b.Model).Where(IsSelected)){
|
||||
if(m != SelectedObject){
|
||||
yield return m;
|
||||
}
|
||||
yield return m;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(SelectedObject != null)
|
||||
yield return SelectedObject;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user