Skip to content

Commit

Permalink
Fix typo in menu operation leading to UI inconsistencies
Browse files Browse the repository at this point in the history
In the callbacks for the log viewer and config viewer menu selection, I
was closing the wrong menu - analysis instead of menu - which had the
effect of leaving the original menu open but hidden. However the hidden
menu still swallowed keypresses, making operation of the default pager
confusing and unpredictable for the config and log files.
  • Loading branch information
gcla committed Jun 5, 2022
1 parent c840f4c commit 04de996
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -3390,14 +3390,14 @@ func Build() (*gowid.App, error) {
Txt: "Show Log",
Key: gowid.MakeKey('l'),
CB: func(app gowid.IApp, w gowid.IWidget) {
multiMenu1Opener.CloseMenu(analysisMenu, app)
multiMenu1Opener.CloseMenu(generalMenu, app)
openLogsUi(app)
},
})
generalMenuItems = append(generalMenuItems, menuutil.SimpleMenuItem{
Txt: "Show Config",
CB: func(app gowid.IApp, w gowid.IWidget) {
multiMenu1Opener.CloseMenu(analysisMenu, app)
multiMenu1Opener.CloseMenu(generalMenu, app)
openConfigUi(app)
},
})
Expand Down

0 comments on commit 04de996

Please sign in to comment.