Permalink
Browse files

fix scrolling in browsers being reversed

  • Loading branch information...
jacob1 committed Jun 1, 2018
1 parent 48a333f commit 0e383e1045b5d39de2687fbba4b0ab6f592260bd
@@ -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);
}
@@ -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)
@@ -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());
}
@@ -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)
{

0 comments on commit 0e383e1

Please sign in to comment.