mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ui: remove ambiguity in mnemonics parsing
Disabling mnemonics should not change displayed action text.
This commit is contained in:
@@ -148,14 +148,8 @@ public final class Presentation implements Cloneable {
|
||||
if (i >= text.length()) break;
|
||||
ch = text.charAt(i);
|
||||
if (ch != '_' && ch != '&') {
|
||||
if (UISettings.getInstance().getDisableMnemonicsInControls()) {
|
||||
myMnemonic = 0;
|
||||
myDisplayedMnemonicIndex = -1;
|
||||
}
|
||||
else {
|
||||
myMnemonic = Character.toUpperCase(ch); // mnemonics are case insensitive
|
||||
myDisplayedMnemonicIndex = i - 1 - backShift;
|
||||
}
|
||||
myMnemonic = Character.toUpperCase(ch); // mnemonics are case insensitive
|
||||
myDisplayedMnemonicIndex = i - 1 - backShift;
|
||||
}
|
||||
else {
|
||||
backShift++;
|
||||
@@ -173,6 +167,11 @@ public final class Presentation implements Cloneable {
|
||||
myText = null;
|
||||
}
|
||||
|
||||
if (UISettings.getInstance().getDisableMnemonicsInControls()) {
|
||||
myMnemonic = 0;
|
||||
myDisplayedMnemonicIndex = -1;
|
||||
}
|
||||
|
||||
fireObjectPropertyChange(PROP_TEXT, oldText, myText);
|
||||
fireObjectPropertyChange(PROP_MNEMONIC_KEY, oldMnemonic, myMnemonic);
|
||||
fireObjectPropertyChange(PROP_MNEMONIC_INDEX, oldDisplayedMnemonicIndex, myDisplayedMnemonicIndex);
|
||||
|
||||
Reference in New Issue
Block a user