mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Issue #142: Cannot reach the top
This commit is contained in:
@ -645,8 +645,14 @@ void PDFDrawWidgetBase<BaseWidget>::wheelEvent(QWheelEvent* event)
|
|||||||
// We must move to another block (we are in block mode)
|
// We must move to another block (we are in block mode)
|
||||||
bool up = scrollByPixels.y() > 0;
|
bool up = scrollByPixels.y() > 0;
|
||||||
|
|
||||||
m_widget->getVerticalScrollbar()->setValue(m_widget->getVerticalScrollbar()->value() + (up ? -1 : 1));
|
QScrollBar* verticalScrollbar = m_widget->getVerticalScrollbar();
|
||||||
proxy->scrollByPixels(QPoint(0, up ? std::numeric_limits<int>::min() : std::numeric_limits<int>::max()));
|
const int newValue = verticalScrollbar->value() + (up ? -1 : 1);
|
||||||
|
|
||||||
|
if (newValue >= verticalScrollbar->minimum() && newValue <= verticalScrollbar->maximum())
|
||||||
|
{
|
||||||
|
verticalScrollbar->setValue(newValue);
|
||||||
|
proxy->scrollByPixels(QPoint(0, up ? std::numeric_limits<int>::min() : std::numeric_limits<int>::max()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
CURRENT:
|
CURRENT:
|
||||||
|
- Issue #142: Cannot reach the top
|
||||||
- Issue #141: Save button in toolbar
|
- Issue #141: Save button in toolbar
|
||||||
- Issue #140: New bookmarks created empty?
|
- Issue #140: New bookmarks created empty?
|
||||||
- Issue #139: Changing page layout reset the current page
|
- Issue #139: Changing page layout reset the current page
|
||||||
|
Reference in New Issue
Block a user