Skip to content

Commit

Permalink
fix scrolling in browsers being reversed
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Jun 1, 2018
1 parent 48a333f commit 0e383e1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/gui/localbrowser/LocalBrowserController.cpp
Expand Up @@ -124,7 +124,7 @@ void LocalBrowserController::SetPage(int page)
void LocalBrowserController::SetPageRelative(int offset)
{
int page = std::min(std::max(browserModel->GetPageNum() + offset, 1), browserModel->GetPageCount());
if(page != browserModel->GetPageCount())
if (page != browserModel->GetPageNum())
browserModel->UpdateSavesList(page);
}

Expand Down
4 changes: 2 additions & 2 deletions src/gui/localbrowser/LocalBrowserView.cpp
Expand Up @@ -245,8 +245,8 @@ void LocalBrowserView::NotifySelectedChanged(LocalBrowserModel * sender)

void LocalBrowserView::OnMouseWheel(int x, int y, int d)
{
if(d)
c->SetPageRelative(d);
if (d)
c->SetPageRelative(-d);
}

void LocalBrowserView::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt)
Expand Down
2 changes: 1 addition & 1 deletion src/gui/search/SearchController.cpp
Expand Up @@ -137,7 +137,7 @@ void SearchController::SetPage(int page)
void SearchController::SetPageRelative(int offset)
{
int page = std::min(std::max(searchModel->GetPageNum() + offset, 1), searchModel->GetPageCount());
if(page != searchModel->GetPageCount())
if (page != searchModel->GetPageNum())
searchModel->UpdateSaveList(page, searchModel->GetLastQuery());
}

Expand Down
4 changes: 2 additions & 2 deletions src/gui/search/SearchView.cpp
Expand Up @@ -778,8 +778,8 @@ void SearchView::OnTick(float dt)

void SearchView::OnMouseWheel(int x, int y, int d)
{
if(d)
c->SetPageRelative(d);
if (d)
c->SetPageRelative(-d);
}
void SearchView::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt)
{
Expand Down

0 comments on commit 0e383e1

Please sign in to comment.