mirror of
https://github.com/jaquadro/NBTExplorer.git
synced 2025-01-09 17:36:25 +00:00
Merge pull request #29 from maruohon/paste-into-empty-list
Allow pasting tags to an empty List. Converts the list's type.
This commit is contained in:
commit
a9f40fc596
1 changed files with 5 additions and 1 deletions
|
@ -46,7 +46,7 @@ namespace NBTExplorer.Model
|
||||||
if (data == null)
|
if (data == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (data.Node != null && data.Node.GetTagType() == Tag.ValueType)
|
if (data.Node != null && (data.Node.GetTagType() == Tag.ValueType || Tag.Count == 0))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +76,10 @@ namespace NBTExplorer.Model
|
||||||
if (clipboard == null || clipboard.Node == null)
|
if (clipboard == null || clipboard.Node == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (Tag.Count == 0) {
|
||||||
|
Tag.ChangeValueType(clipboard.Node.GetTagType());
|
||||||
|
}
|
||||||
|
|
||||||
AppendTag(clipboard.Node);
|
AppendTag(clipboard.Node);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue