Changeset View
Changeset View
Standalone View
Standalone View
lib/documentview/documentview.cpp
Show First 20 Lines • Show All 404 Lines • ▼ Show 20 Line(s) | 404 | if (d->mDocument) { | |||
---|---|---|---|---|---|
405 | if (url == d->mDocument->url()) { | 405 | if (url == d->mDocument->url()) { | ||
406 | return; | 406 | return; | ||
407 | } | 407 | } | ||
408 | disconnect(d->mDocument.data(), 0, this, 0); | 408 | disconnect(d->mDocument.data(), 0, this, 0); | ||
409 | } | 409 | } | ||
410 | d->mSetup = setup; | 410 | d->mSetup = setup; | ||
411 | d->mDocument = DocumentFactory::instance()->load(url); | 411 | d->mDocument = DocumentFactory::instance()->load(url); | ||
412 | connect(d->mDocument.data(), SIGNAL(busyChanged(QUrl,bool)), SLOT(slotBusyChanged(QUrl,bool))); | 412 | connect(d->mDocument.data(), SIGNAL(busyChanged(QUrl,bool)), SLOT(slotBusyChanged(QUrl,bool))); | ||
413 | connect(d->mDocument.data(), &Document::modified, this, [this]() { | ||||
414 | d->updateZoomSnapValues(); | ||||
415 | }); | ||||
muhlenpfordt: This is needed to update the minimum zoom level, otherwise it stays at 100% after undoing the… | |||||
413 | 416 | | |||
414 | if (d->mDocument->loadingState() < Document::KindDetermined) { | 417 | if (d->mDocument->loadingState() < Document::KindDetermined) { | ||
415 | MessageViewAdapter* messageViewAdapter = qobject_cast<MessageViewAdapter*>(d->mAdapter.data()); | 418 | MessageViewAdapter* messageViewAdapter = qobject_cast<MessageViewAdapter*>(d->mAdapter.data()); | ||
416 | if (messageViewAdapter) { | 419 | if (messageViewAdapter) { | ||
417 | messageViewAdapter->setInfoMessage(QString()); | 420 | messageViewAdapter->setInfoMessage(QString()); | ||
418 | } | 421 | } | ||
419 | d->showLoadingIndicator(); | 422 | d->showLoadingIndicator(); | ||
420 | connect(d->mDocument.data(), SIGNAL(kindDetermined(QUrl)), | 423 | connect(d->mDocument.data(), SIGNAL(kindDetermined(QUrl)), | ||
▲ Show 20 Lines • Show All 399 Lines • Show Last 20 Lines |
This is needed to update the minimum zoom level, otherwise it stays at 100% after undoing the crop operation.