update to latest UWT API changes for treeviews
This commit is contained in:
parent
34aa3ca324
commit
29c0297c5f
@ -335,12 +335,12 @@ namespace UniversalEditor.UserInterface.Dialogs
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="TreeModelRow" /> which has zero child rows, or null if no such <see cref="TreeModelRow" /> exists.</returns>
|
||||
/// <param name="row">Row.</param>
|
||||
private TreeModelRow ExpandSingleChildRows(TreeModelRow row)
|
||||
private TreeModelRow ExpandSingleChildRows(ListViewControl tv, TreeModelRow row)
|
||||
{
|
||||
if (row.Rows.Count == 1)
|
||||
{
|
||||
row.Expanded = true;
|
||||
return ExpandSingleChildRows(row.Rows[0]);
|
||||
tv.SetExpanded(row, true);
|
||||
return ExpandSingleChildRows(tv, row.Rows[0]);
|
||||
}
|
||||
else if (row.Rows.Count == 0)
|
||||
{
|
||||
@ -376,7 +376,7 @@ namespace UniversalEditor.UserInterface.Dialogs
|
||||
|
||||
if (tmObjectModel.Rows.Count == 1)
|
||||
{
|
||||
TreeModelRow row = ExpandSingleChildRows(tmObjectModel.Rows[0]);
|
||||
TreeModelRow row = ExpandSingleChildRows(tvObjectModel, tmObjectModel.Rows[0]);
|
||||
if (row != null)
|
||||
{
|
||||
tvObjectModel.SelectedRows.Clear();
|
||||
@ -493,7 +493,7 @@ namespace UniversalEditor.UserInterface.Dialogs
|
||||
RefreshProjectTemplates(tvObjectModel.SelectedRows[0]);
|
||||
}
|
||||
|
||||
if (tmTemplate.Rows.Count == 1)
|
||||
if (tmTemplate.Rows.Count > 0)
|
||||
{
|
||||
tvTemplate.SelectedRows.Add(tmTemplate.Rows[0]);
|
||||
}
|
||||
|
||||
@ -119,7 +119,7 @@ namespace UniversalEditor.Editors.FileSystem
|
||||
{
|
||||
// nautilus does the equivalent of 'CurrentFolder = ...' except opens in multiple tabs
|
||||
// which... we don't really have the ability to do multiple tabs for the same document at the moment
|
||||
tv.SelectedRows[i].Expanded = true;
|
||||
tv.SetExpanded(tv.SelectedRows[i], true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -83,7 +83,7 @@ namespace UniversalEditor.Plugins.RavenSoftware.UserInterface.Editors.Icarus
|
||||
if (selectedCommand != null && selectedCommand.IsContainer)
|
||||
{
|
||||
RecursiveAddCommand(omcmd, tv.SelectedRows[0]);
|
||||
tv.SelectedRows[0].Expanded = true;
|
||||
tv.SetExpanded(tv.SelectedRows[0], true);
|
||||
|
||||
selectedCommand.Commands.Add(omcmd);
|
||||
tv.SelectedRows[0].RowColumns[0].Value = GetCommandText(selectedCommand);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user