Changed how duplicates is passed down the cmdset merge stack.
This commit is contained in:
parent
edacd58eab
commit
cc76de348e
2 changed files with 21 additions and 9 deletions
|
|
@ -391,11 +391,11 @@ class CmdSet(with_metaclass(_CmdSetMeta, object)):
|
|||
cmdset_c = self._union(cmdset_a, self)
|
||||
|
||||
# pass through options whenever they are set, unless the merging or higher-prio
|
||||
# set changes the setting (i.e. has a non-None value).
|
||||
# set changes the setting (i.e. has a non-None value). We don't pass through
|
||||
# the duplicates setting; that is per-merge
|
||||
cmdset_c.no_channels = self.no_channels if cmdset_a.no_channels is None else cmdset_a.no_channels
|
||||
cmdset_c.no_exits = self.no_exits if cmdset_a.no_exits is None else cmdset_a.no_exits
|
||||
cmdset_c.no_objs = self.no_objs if cmdset_a.no_objs is None else cmdset_a.no_objs
|
||||
cmdset_c.duplicates = self.duplicates if cmdset_a.duplicates is None else cmdset_a.duplicates
|
||||
|
||||
else:
|
||||
# B higher priority than A
|
||||
|
|
@ -415,11 +415,11 @@ class CmdSet(with_metaclass(_CmdSetMeta, object)):
|
|||
cmdset_c = self._union(self, cmdset_a)
|
||||
|
||||
# pass through options whenever they are set, unless the higher-prio
|
||||
# set changes the setting (i.e. has a non-None value).
|
||||
# set changes the setting (i.e. has a non-None value). We don't pass through
|
||||
# the duplicates setting; that is per-merge
|
||||
cmdset_c.no_channels = cmdset_a.no_channels if self.no_channels is None else self.no_channels
|
||||
cmdset_c.no_exits = cmdset_a.no_exits if self.no_exits is None else self.no_exits
|
||||
cmdset_c.no_objs = cmdset_a.no_objs if self.no_objs is None else self.no_objs
|
||||
cmdset_c.duplicates = cmdset_a.duplicates if self.duplicates is None else self.duplicates
|
||||
|
||||
# we store actual_mergetype since key_mergetypes
|
||||
# might be different from the main mergetype.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue