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:
@ -60,12 +60,10 @@ void GoToDialog::setupUI()
|
||||
void GoToDialog::goTo()
|
||||
{
|
||||
unsigned int page = pageNumber->text().toInt();
|
||||
pageNumber->clear();
|
||||
|
||||
if (page >= 1)
|
||||
if (page >= 1 && page <= v->top()) {
|
||||
emit(goToPage(page - 1));
|
||||
|
||||
close();
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
void GoToDialog::setNumPages(unsigned int numPages)
|
||||
|
Reference in New Issue
Block a user