diff --git a/openbr/gui/pageflipwidget.cpp b/openbr/gui/pageflipwidget.cpp index 23f56d4..86993cf 100644 --- a/openbr/gui/pageflipwidget.cpp +++ b/openbr/gui/pageflipwidget.cpp @@ -7,28 +7,24 @@ PageFlipWidget::PageFlipWidget(QWidget *parent) : { firstPage = new QPushButton(this); firstPage->setIcon(QIcon(":/arrow-first.png")); - firstPage->setMaximumWidth(30); firstPage->setToolTip("Go to first page"); connect(firstPage, SIGNAL(clicked()), this, SIGNAL(first())); previousPage = new QPushButton(this); previousPage->setIcon(QIcon(":/arrow-left.png")); - previousPage->setMaximumWidth(30); previousPage->setToolTip("Go to previous page"); connect(previousPage, SIGNAL(clicked()), this, SIGNAL(previous())); nextPage = new QPushButton(this); nextPage->setIcon(QIcon(":/arrow-right.png")); - nextPage->setMaximumWidth(30); nextPage->setToolTip("Go to next page"); connect(nextPage, SIGNAL(clicked()), this, SIGNAL(next())); lastPage = new QPushButton(this); lastPage->setIcon(QIcon(":/arrow-last.png")); - lastPage->setMaximumWidth(30); lastPage->setToolTip("Go to last page"); connect(lastPage, SIGNAL(clicked()), this, SIGNAL(last())); diff --git a/openbr/gui/subjectviewer.cpp b/openbr/gui/subjectviewer.cpp index 3727d61..3908bcc 100644 --- a/openbr/gui/subjectviewer.cpp +++ b/openbr/gui/subjectviewer.cpp @@ -25,13 +25,16 @@ SubjectViewer::SubjectViewer(QWidget *parent) void SubjectViewer::setFiles(const FileList &files) { - if (files.isEmpty()) return; - currentIndex = 0; this->files = files; - info.setText(QString::number(currentIndex+1) + "/" + QString::number(files.size())); - viewer.setFile(this->files[currentIndex]); + if (!files.empty()) { + info.setText(QString::number(currentIndex+1) + "/" + QString::number(files.size())); + viewer.setFile(this->files[currentIndex]); + } else { + info.setText("-"); + viewer.setFile(File()); + } } void SubjectViewer::wheelEvent(QWheelEvent *event)