mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 04:54:29 -04:00
Merge branch 'develop' into clazy_autorefactoring
This commit is contained in:
@ -32,7 +32,8 @@ GoToFlowToolBar::GoToFlowToolBar(QWidget *parent)
|
||||
" border-radius: 1px;"
|
||||
"}");
|
||||
|
||||
connect(slider, &QSlider::valueChanged, this, [this](int v) { emit(setCenter(v)); });
|
||||
connect(slider, &QSlider::valueChanged, this, [&](int v) { emit(setCenter(v)); });
|
||||
connect(slider, &QSlider::valueChanged, this, [=](int v) { emit(setPage(v)); });
|
||||
|
||||
pageHint = new QLabel("<b>" + tr("Page : ") + "</b>", this);
|
||||
v = new QIntValidator(this);
|
||||
@ -109,8 +110,10 @@ void GoToFlowToolBar::setTop(int numPages)
|
||||
|
||||
void GoToFlowToolBar::goTo()
|
||||
{
|
||||
if (edit->text().toInt() != 0)
|
||||
emit(goToPage(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