mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 15:47:22 -08:00
Fixed page turns "List index out of range" errors
This commit is contained in:
parent
41cef1444a
commit
5f96b66f5f
1 changed files with 2 additions and 2 deletions
|
@ -397,7 +397,7 @@ reader::~reader()
|
|||
|
||||
void reader::on_nextBtn_clicked()
|
||||
{
|
||||
if(split_total - 1 == 0) {
|
||||
if(split_total - 1 == 1) {
|
||||
QMessageBox::critical(this, tr("Invalid argument"), tr("You've reached the end of the document."));
|
||||
}
|
||||
else {
|
||||
|
@ -426,7 +426,7 @@ void reader::on_nextBtn_clicked()
|
|||
void reader::on_previousBtn_clicked()
|
||||
{
|
||||
// Making sure we won't encounter a "List index out of range" error ;)
|
||||
if(split_total >= split_files_number) {
|
||||
if(split_total >= split_files_number - 1) {
|
||||
QMessageBox::critical(this, tr("Invalid argument"), tr("No previous page."));
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue