+ onSettingsChanged("zoom");
+ onSettingsChanged("font");
+ scheduleRestoreAfterLoad();
+}
+
+void BookView::scheduleRestoreAfterLoad()
+{
+ TRACE;
+ if (restoreTimer->isActive()) {
+ // Ignore request if a restore is already in progress
+ return;
+ }
+
+ disconnect(restoreTimer, SIGNAL(timeout()), this, 0);
+ connect(restoreTimer, SIGNAL(timeout()), this, SLOT(restoreAfterLoad()));
+ restoreTimer->setSingleShot(true);
+ restoreTimer->start(210);
+}
+
+void BookView::scheduleRestoreLastBookmark()
+{
+ TRACE;
+ if (restoreTimer->isActive()) {
+ // Ignore request if a restore is already in progress
+ return;
+ }
+
+ disconnect(restoreTimer, SIGNAL(timeout()), this, 0);
+ connect(restoreTimer, SIGNAL(timeout()), this,
+ SLOT(restoreLastBookmark()));
+ restoreTimer->setSingleShot(true);
+ restoreTimer->start(210);
+}
+
+void BookView::restoreAfterLoad()
+{
+ TRACE;
+ if (restoreFragmentAfterLoad) {
+ qDebug() << "Restorint to fragment" << fragmentAfterLoad;
+ goToFragment(fragmentAfterLoad);
+ restoreFragmentAfterLoad = false;
+ } else if (restorePositionAfterLoad) {
+ qDebug() << "Restoring to position" << positionAfterLoad;
+ goToPosition(positionAfterLoad);
+ restorePositionAfterLoad = false;
+ }
+
+ emit partLoadEnd(contentIndex);
+ showProgress();