Adjustment for #1179 to rebuild by default
This commit is contained in:
@@ -724,10 +724,10 @@ namespace FlaxEditor.Modules
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="proxy">The proxy type.</param>
|
/// <param name="proxy">The proxy type.</param>
|
||||||
/// <param name="rebuild">Should rebuild entire database after addition.</param>
|
/// <param name="rebuild">Should rebuild entire database after addition.</param>
|
||||||
public void AddProxy(ContentProxy proxy, bool rebuild = false)
|
public void AddProxy(ContentProxy proxy, bool rebuild = true)
|
||||||
{
|
{
|
||||||
Proxy.Insert(0, proxy);
|
Proxy.Insert(0, proxy);
|
||||||
if(rebuild)
|
if (rebuild)
|
||||||
Rebuild();
|
Rebuild();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -735,16 +735,18 @@ namespace FlaxEditor.Modules
|
|||||||
/// Removes the proxy.
|
/// Removes the proxy.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="proxy">The proxy type.</param>
|
/// <param name="proxy">The proxy type.</param>
|
||||||
public void RemoveProxy(ContentProxy proxy)
|
/// <param name="rebuild">Should rebuild entire database after removal.</param>
|
||||||
|
public void RemoveProxy(ContentProxy proxy, bool rebuild = true)
|
||||||
{
|
{
|
||||||
Proxy.Remove(proxy);
|
Proxy.Remove(proxy);
|
||||||
Rebuild();
|
if (rebuild)
|
||||||
|
Rebuild();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Rebuilds the whole database (eg. when adding custom item types from plugin).
|
/// Rebuilds the whole database (eg. when adding custom item types from plugin).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="immediate">True if rebuild num, otherwise will be scheduled for the next editor update (eg. to batch multiple rebuilds within a frame).</param>
|
/// <param name="immediate">True if rebuild now, otherwise will be scheduled for the next editor update (eg. to batch multiple rebuilds within a frame).</param>
|
||||||
public void Rebuild(bool immediate = false)
|
public void Rebuild(bool immediate = false)
|
||||||
{
|
{
|
||||||
_rebuildFlag = true;
|
_rebuildFlag = true;
|
||||||
@@ -804,7 +806,7 @@ namespace FlaxEditor.Modules
|
|||||||
for (int i = 0; i < children.Length; i++)
|
for (int i = 0; i < children.Length; i++)
|
||||||
Dispose(children[i]);
|
Dispose(children[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
item.ParentFolder = null;
|
item.ParentFolder = null;
|
||||||
folder.Node.Dispose();
|
folder.Node.Dispose();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user