Commit 69b8575566d45481fbf31bd208f4ed6cc437529d
1 parent
dedec173
Updates to pageflip and subjectviewer
Showing
2 changed files
with
7 additions
and
8 deletions
openbr/gui/pageflipwidget.cpp
| ... | ... | @@ -7,28 +7,24 @@ PageFlipWidget::PageFlipWidget(QWidget *parent) : |
| 7 | 7 | { |
| 8 | 8 | firstPage = new QPushButton(this); |
| 9 | 9 | firstPage->setIcon(QIcon(":/arrow-first.png")); |
| 10 | - firstPage->setMaximumWidth(30); | |
| 11 | 10 | firstPage->setToolTip("Go to first page"); |
| 12 | 11 | |
| 13 | 12 | connect(firstPage, SIGNAL(clicked()), this, SIGNAL(first())); |
| 14 | 13 | |
| 15 | 14 | previousPage = new QPushButton(this); |
| 16 | 15 | previousPage->setIcon(QIcon(":/arrow-left.png")); |
| 17 | - previousPage->setMaximumWidth(30); | |
| 18 | 16 | previousPage->setToolTip("Go to previous page"); |
| 19 | 17 | |
| 20 | 18 | connect(previousPage, SIGNAL(clicked()), this, SIGNAL(previous())); |
| 21 | 19 | |
| 22 | 20 | nextPage = new QPushButton(this); |
| 23 | 21 | nextPage->setIcon(QIcon(":/arrow-right.png")); |
| 24 | - nextPage->setMaximumWidth(30); | |
| 25 | 22 | nextPage->setToolTip("Go to next page"); |
| 26 | 23 | |
| 27 | 24 | connect(nextPage, SIGNAL(clicked()), this, SIGNAL(next())); |
| 28 | 25 | |
| 29 | 26 | lastPage = new QPushButton(this); |
| 30 | 27 | lastPage->setIcon(QIcon(":/arrow-last.png")); |
| 31 | - lastPage->setMaximumWidth(30); | |
| 32 | 28 | lastPage->setToolTip("Go to last page"); |
| 33 | 29 | |
| 34 | 30 | connect(lastPage, SIGNAL(clicked()), this, SIGNAL(last())); | ... | ... |
openbr/gui/subjectviewer.cpp
| ... | ... | @@ -25,13 +25,16 @@ SubjectViewer::SubjectViewer(QWidget *parent) |
| 25 | 25 | |
| 26 | 26 | void SubjectViewer::setFiles(const FileList &files) |
| 27 | 27 | { |
| 28 | - if (files.isEmpty()) return; | |
| 29 | - | |
| 30 | 28 | currentIndex = 0; |
| 31 | 29 | this->files = files; |
| 32 | 30 | |
| 33 | - info.setText(QString::number(currentIndex+1) + "/" + QString::number(files.size())); | |
| 34 | - viewer.setFile(this->files[currentIndex]); | |
| 31 | + if (!files.empty()) { | |
| 32 | + info.setText(QString::number(currentIndex+1) + "/" + QString::number(files.size())); | |
| 33 | + viewer.setFile(this->files[currentIndex]); | |
| 34 | + } else { | |
| 35 | + info.setText("-"); | |
| 36 | + viewer.setFile(File()); | |
| 37 | + } | |
| 35 | 38 | } |
| 36 | 39 | |
| 37 | 40 | void SubjectViewer::wheelEvent(QWheelEvent *event) | ... | ... |