IDEA-245047 ui: fix duplicated entries in git menu
authorAleksey Pivovarov <AMPivovarov@gmail.com>
Mon, 3 Aug 2020 22:08:01 +0000 (01:08 +0300)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Wed, 12 Aug 2020 18:57:34 +0000 (18:57 +0000)
commit3b41089e4558afa2b35f91248ede3008431d87a8
tree126095fd63350b7444fa6a113c1a10eaad12cf2a
parent2a066439ef458dfd78a2d7056ccb893e2e5dc5b0
IDEA-245047 ui: fix duplicated entries in git menu

Add workaround for 'JMenu$MenuChangeListener' implementation, that allows recursive 'menuSelected' events.
It checks 'isSelected' flag on every ChangeEvent and updates its value only after notifying all listeners.
If one of the listeners changes something unrelated in the model (ex: button mnemonic), 'fireMenuSelected()' events might be recursively fired again.

GitOrigin-RevId: e9e699573b492b472787cddb61f5b6d403cab099
platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionMenu.java