From e7e28526812b9d5230001cc7cf4dbb16b16d7952 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 21 Sep 2013 10:32:54 +0200 Subject: [PATCH] When overriding a key, also adjust its number of levels (#57242). This gets rid of the age-old warning of the right Alt key being ONE_LEVEL but having two symbols assigned. Reducing the number of levels to that of the later definition takes away the cause of the warning. Fixes bug #57242 . Signed-off-by: Benno Schulenberg Reviewed-by: Ran Benita --- symbols.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/symbols.c b/symbols.c index d43ba9f..d192633 100644 --- a/symbols.c +++ b/symbols.c @@ -339,18 +339,18 @@ MergeKeyGroups(SymbolsInfo * info, clobber = (from->defs.merge != MergeAugment); report = (warningLevel > 9) || ((into->defs.fileID == from->defs.fileID) && (warningLevel > 0)); - if (into->numLevels[group] >= from->numLevels[group]) - { - resultSyms = into->syms[group]; - resultActs = into->acts[group]; - resultWidth = into->numLevels[group]; - } - else + if ((from->numLevels[group] > into->numLevels[group]) || clobber) { resultSyms = from->syms[group]; resultActs = from->acts[group]; resultWidth = from->numLevels[group]; } + else + { + resultSyms = into->syms[group]; + resultActs = into->acts[group]; + resultWidth = into->numLevels[group]; + } if (resultSyms == NULL) { resultSyms = uTypedCalloc(resultWidth, KeySym); -- 1.7.0.4