mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 04:54:29 -04:00
GoTo dialogs: Restrict input values to existing pages
This commit is contained in:
@ -109,8 +109,10 @@ void GoToFlowToolBar::setTop(int numPages)
|
||||
|
||||
void GoToFlowToolBar::goTo()
|
||||
{
|
||||
if (edit->text().toInt() != 0)
|
||||
emit(goTo(edit->text().toInt() - 1));
|
||||
unsigned int page = edit->text().toInt();
|
||||
if (page >= 1 && page <= v->top()) {
|
||||
emit(goTo(page - 1));
|
||||
}
|
||||
}
|
||||
|
||||
void GoToFlowToolBar::centerSlide()
|
||||
|
Reference in New Issue
Block a user