forked from mirrors/NBTExplorer
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)
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -76,6 +76,10 @@ namespace NBTExplorer.Model
|
|||
if (clipboard == null || clipboard.Node == null)
|
||||
return false;
|
||||
|
||||
if (Tag.Count == 0) {
|
||||
Tag.ChangeValueType(clipboard.Node.GetTagType());
|
||||
}
|
||||
|
||||
AppendTag(clipboard.Node);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue