-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Commit b3dac78
committed
Handle nested submenus of the Tools menu
There is some code that, for each submenu under Tools, shows the
selected item in the label of the submenu itself (e.g. before opening
the submenu). This was done whenever the Tools menu is opened and
iterated over all the items in the submenu to identify the s
Previously, this code only looked at direct children of the submenu.
Now, this code also looks through submenus recursively, to keep the code
working even when items are divided over sub-submenus.
This makes a small behaviour change: previously, the first selected item
with a non-zero label was used. Now, the first selected item is used,
which makes the code a bit cleaner. I cannot quickly see any case where
the first selected item would have an empty text (and even more that
there is *another* selected item), so this check seems unnecessary. If
this case would occur nonetheless, it would only mean the selected item
is not displayed in the tools menu, nothing would otherwise break.1 parent a144887 commit b3dac78
1 file changed
+17
-9
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
761 | 761 |
| |
762 | 762 |
| |
763 | 763 |
| |
764 | + | ||
765 | + | ||
766 | + | ||
767 | + | ||
768 | + | ||
769 | + | ||
770 | + | ||
771 | + | ||
772 | + | ||
773 | + | ||
774 | + | ||
775 | + | ||
776 | + | ||
777 | + | ||
764 | 778 |
| |
765 | 779 |
| |
766 | 780 |
| |
| |||
772 | 786 |
| |
773 | 787 |
| |
774 | 788 |
| |
775 | - | ||
776 | - | ||
777 | - | ||
778 | - | ||
779 | - | ||
780 | - | ||
781 | - | ||
782 | - | ||
783 | - | ||
789 | + | ||
790 | + | ||
791 | + | ||
784 | 792 |
| |
785 | 793 |
| |
786 | 794 |
| |
|
0 commit comments