Skip to content

Commit

Permalink
Fix for repeat dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Suraj-Yadav committed Jul 19, 2024
1 parent 1f6c210 commit 0d84f61
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class MyFrame : public wxFrame {
ComicGallery* comicGallery = nullptr;
ComicViewer* comicViewer = nullptr;
wxSizer* sizer = nullptr;
int lastKeyCode = 0;

void OnKeyDown(wxKeyEvent& event);

Expand Down Expand Up @@ -75,7 +76,8 @@ void MyFrame::OnKeyDown(wxKeyEvent& event) {
SetTitle(DEFAULT_FRAME_TITLE);
break;
case 'G':
if (event.CmdDown() || event.ControlDown()) {
if ((event.CmdDown() || event.ControlDown()) &&
lastKeyCode != event.GetKeyCode()) {
comicViewer->HandleInput(Navigation::JumpToPage);
}
break;
Expand Down Expand Up @@ -115,6 +117,7 @@ void MyFrame::OnKeyDown(wxKeyEvent& event) {
break;
}
}
lastKeyCode = event.GetKeyCode();
event.Skip();
}

Expand Down

0 comments on commit 0d84f61

Please sign in to comment.