Skip to content
Permalink
Browse files

[GameStudio] Allow drag & dropping of read-only assets (as long as th…

…ey wouldn't be modified)
  • Loading branch information
xen2 committed Jan 29, 2019
1 parent 4347414 commit f542345bb83b0171e53b0716be3a8fd61b6efb8d
@@ -314,7 +314,7 @@ protected object InitializeDrag(object originalSource)
}
object data = null;
var container = GetContainer(originalSource);
var itemsToDrag = GetItemsToDrag(container).Where(x => !(x is IIsEditableViewModel) || ((IIsEditableViewModel)x).IsEditable).ToList();
var itemsToDrag = GetItemsToDrag(container).ToList();
if (itemsToDrag.Count > 0)
{
var dragContainer = new DragContainer(itemsToDrag);
@@ -190,6 +190,12 @@ protected void UpdateAssetUrls()

bool IAddChildViewModel.CanAddChildren(IReadOnlyCollection<object> children, AddChildModifiers modifiers, out string message)
{
if (children.Any(x => (x is IIsEditableViewModel) && !((IIsEditableViewModel)x).IsEditable))
{
message = "Some source items are read-only";
return false;
}

if (!Package.IsEditable)
{
message = "Read-only package";

0 comments on commit f542345

Please sign in to comment.
You can’t perform that action at this time.