Made it so system cmdsets (_exitcmdset and _channelcmdset for example) don't replace the name of other cmdsets in a merger. These "invisible" cmdsets caused confusion for the key_mergetype dictionary (which should e.g. ignore the DefaultCharacter set instead of replace it, but since the system cmdsets were merged in, the DefaultCharacter set is no longer named that when it's time to merge in the new set). The fix ignores name replacing if the merging set has a key starting with _.

This commit is contained in:
Griatch 2013-11-12 20:51:26 +01:00
parent 769e2a8744
commit 0ea57f33a9

View file

@ -278,6 +278,9 @@ class CmdSet(object):
cmdset_c.no_channels = self.no_channels
cmdset_c.no_exits = self.no_exits
cmdset_c.no_objs = self.no_objs
if self.key.startswith("_"):
# don't rename new output if the merge set's name starts with _
cmdset_c.key = cmdset_b.key
else:
# B higher priority than A
@ -297,6 +300,9 @@ class CmdSet(object):
cmdset_c.no_channels = cmdset_b.no_channels
cmdset_c.no_exits = cmdset_b.no_exits
cmdset_c.no_objs = cmdset_b.no_objs
if cmdset_b.key.startswith("_"):
# don't rename new output if the merge set's name starts with _
cmdset_c.key = self.key
# we store actual_mergetype since key_mergetypes
# might be different from the main mergetype.