Removed useless debug logs

This commit is contained in:
thallard
2021-08-05 23:05:27 +02:00
parent 9682ac4643
commit 1426b4ca49
2 changed files with 12 additions and 18 deletions

View File

@@ -218,10 +218,10 @@ namespace FlaxEditor.Content.GUI
/// Shows the items collection in the view.
/// </summary>
/// <param name="items">The items to show.</param>
/// <param name="sortMethod">The sort method for items.</param>
/// <param name="additive">If set to <c>true</c> items will be added to the current selection. Otherwise selection will be cleared before.</param>
public void ShowItems(List<ContentItem> items, string sortMethod, bool additive = false)
{
Console.WriteLine("GROS CON");
if (items == null)
throw new ArgumentNullException();
@@ -250,28 +250,24 @@ namespace FlaxEditor.Content.GUI
items[i].AddReference(this);
}
// Sort items
ContentItem oui = (ContentItem) _children[0];
Console.WriteLine("Ici " + oui);
// Sort items depending on sortMethod parameter
_children.Sort(((control, control1) =>
{
if (sortMethod == "Alphabetic Reverse")
{
if (((ContentItem)control).CompareTo((ContentItem)control1) > 0)
return -1;
if (((ContentItem)control).CompareTo((ContentItem)control1) == 0)
return 0;
if (control.CompareTo(control1) > 0)
{
return -1;
}
if (control.CompareTo(control1) == 0)
{
return 0;
}
return 1;
}
return (((ContentItem)control).CompareTo((ContentItem)control1));
return control.CompareTo(control1);
}));
// Unload and perform UI layout
IsLayoutLocked = wasLayoutLocked;
PerformLayout();

View File

@@ -39,7 +39,7 @@ namespace FlaxEditor.Windows
private TextBox _foldersSearchBox;
private TextBox _itemsSearchBox;
private ViewDropdown _viewDropdown;
private string _sortBy;
private string _sortBy = "Alphabetic Order";
private RootContentTreeNode _root;
@@ -220,7 +220,6 @@ namespace FlaxEditor.Windows
var sortBy = menu.AddChildMenu("Sort by");
sortBy.ContextMenu.AddButton("Alphabetic Order", OnSortByButtonClicked);
sortBy.ContextMenu.AddButton("Alphabetic Reverse", OnSortByButtonClicked);
sortBy.ContextMenu.AddButton("Last Modified", OnSortByButtonClicked);
return menu;
}
@@ -240,7 +239,6 @@ namespace FlaxEditor.Windows
{
Editor.Windows.ContentWin._sortBy = button.Text;
RefreshView(SelectedNode);
Console.WriteLine(Editor.Windows.ContentWin._sortBy);
}
/// <summary>