Skip to content

Commit

Permalink
Fix for regression with on-top toolbar due to incorrect commandBehavi…
Browse files Browse the repository at this point in the history
  • Loading branch information
shai-almog committed Nov 13, 2017
1 parent a60ebeb commit 2229890
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CodenameOne/src/com/codename1/ui/SideMenuBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public static void closeCurrentMenu() {
* @param callback will be invoked when the menu is actually closed
*/
public static void closeCurrentMenu(final Runnable callback) {
if(Toolbar.isOnTopSideMenu() && Display.getInstance().getCommandBehavior() != Display.COMMAND_BEHAVIOR_SIDE_NAVIGATION) {
if(Toolbar.isOnTopSideMenu() && (Toolbar.isGlobalToolbar() || Display.getInstance().getCommandBehavior() != Display.COMMAND_BEHAVIOR_SIDE_NAVIGATION)) {
Display.getInstance().getCurrent().getToolbar().closeSideMenu();
callback.run();
return;
Expand Down Expand Up @@ -1774,7 +1774,7 @@ public void actionPerformed(ActionEvent evt) {
}

public void actionPerformed(final ActionEvent evt) {
if(Toolbar.isOnTopSideMenu() && Display.getInstance().getCommandBehavior() != Display.COMMAND_BEHAVIOR_SIDE_NAVIGATION) {
if(Toolbar.isOnTopSideMenu() && (Toolbar.isGlobalToolbar() || Display.getInstance().getCommandBehavior() != Display.COMMAND_BEHAVIOR_SIDE_NAVIGATION)) {
Display.getInstance().getCurrent().getToolbar().closeSideMenu();
cmd.actionPerformed(evt);
return;
Expand Down

0 comments on commit 2229890

Please sign in to comment.