Skip to content
Snippets Groups Projects
Commit 275cab93 authored by Eric Oulashin's avatar Eric Oulashin
Browse files

Fix for left/right navigation for command bar introduced in last commit

parent 2cd62d2f
No related branches found
No related tags found
No related merge requests found
...@@ -1192,19 +1192,21 @@ function DDFileMenuBar_getDDFileMenuBarItemText(pText, pSelected, pWithTrailingB ...@@ -1192,19 +1192,21 @@ function DDFileMenuBar_getDDFileMenuBarItemText(pText, pSelected, pWithTrailingB
// menu bar on the screen // menu bar on the screen
function DDFileMenuBar_incrementMenuItemAndRefresh() function DDFileMenuBar_incrementMenuItemAndRefresh()
{ {
++this.currentCommandIdx; var newCmdIdx = this.currentCommandIdx + 1;
if (this.currentCommandIdx >= this.cmdArray.length) if (newCmdIdx >= this.cmdArray.length)
this.currentCommandIdx = 0; newCmdIdx = 0;
this.refreshWithNewAction(this.currentCommandIdx); // Will set this.currentCommandIdx
this.refreshWithNewAction(newCmdIdx);
} }
// For the DDFileMenuBar class: Decrements to the previous menu item and refreshes the // For the DDFileMenuBar class: Decrements to the previous menu item and refreshes the
// menu bar on the screen // menu bar on the screen
function DDFileMenuBar_decrementMenuItemAndRefresh() function DDFileMenuBar_decrementMenuItemAndRefresh()
{ {
--this.currentCommandIdx; var newCmdIdx = this.currentCommandIdx - 1;
if (this.currentCommandIdx < 0) if (newCmdIdx < 0)
this.currentCommandIdx = this.cmdArray.length - 1; newCmdIdx = this.cmdArray.length - 1;
this.refreshWithNewAction(this.currentCommandIdx); // Will set this.currentCommandIdx
this.refreshWithNewAction(newCmdIdx);
} }
// For the DDFileMenuBar class: Gets the return code for the currently selected action // For the DDFileMenuBar class: Gets the return code for the currently selected action
function DDFileMenuBar_getCurrentSelectedAction() function DDFileMenuBar_getCurrentSelectedAction()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment