+
+ QTimer::singleShot(0, this, SLOT(restoreContentsPos()));
+}
+
+void DolphinView::restoreContentsPos()
+{
+ int index = 0;
+ const QLinkedList<UrlNavigator::HistoryElem> history = urlHistory(index);
+ if (!history.isEmpty()) {
+ QAbstractItemView* view = itemView();
+ // TODO: view->setCurrentItem(history[index].currentFileName());
+
+ QLinkedList<UrlNavigator::HistoryElem>::const_iterator it = history.begin();
+ it += index;
+ view->horizontalScrollBar()->setValue((*it).contentsX());
+ view->verticalScrollBar()->setValue((*it).contentsY());
+ }