diff --git a/krusader/Panel/panelfunc.cpp b/krusader/Panel/panelfunc.cpp --- a/krusader/Panel/panelfunc.cpp +++ b/krusader/Panel/panelfunc.cpp @@ -283,12 +283,9 @@ panel->view->clearSavedSelection(); } - if(panel->vfsError) + if(panel->vfsError) { panel->vfsError->hide(); - - bool refreshFailed = false; - while (true) { - QUrl url = history->currentUrl(); + } isEqualUrl = files()->currentDirectory().matches(url, QUrl::StripTrailingSlash); @@ -332,6 +329,7 @@ int savedHistoryState = history->state(); + panel->urlNavigator->setLocationUrl(url); // NOTE: this is blocking. Returns false on error or interruption (cancel requested or panel // was deleted) const bool refreshed = vfsP->refresh(url); @@ -339,28 +337,8 @@ // update the history and address bar, as the actual url might differ from the one requested history->setCurrentUrl(vfsP->currentDirectory()); panel->urlNavigator->setLocationUrl(vfsP->currentDirectory()); - break; // we have a valid refreshed URL now } - if (!panel || !panel->view) - // this panel was deleted while refreshing - return; - - refreshFailed = true; - panel->view->setNameToMakeCurrent(QString()); - - if(history->state() != savedHistoryState) // don't go back if the history was touched - break; - if(!history->goBack()) { - // put the root dir to the beginning of history, if it's not there yet - if (!url.matches(QUrl::fromLocalFile(ROOT_DIR), QUrl::StripTrailingSlash)) - history->pushBackRoot(); - else - break; - } - _ignoreVFSErrors = true; - } - _ignoreVFSErrors = false; panel->view->setNameToMakeCurrent(QString()); panel->setCursor(Qt::ArrowCursor); @@ -371,7 +349,7 @@ // see if the open url operation failed, and if so, // put the attempted url in the navigator bar and let the user change it - if (refreshFailed) { + if (!refreshed) { if(isSyncing(url)) panel->otherPanel()->gui->syncBrowseButton->setChecked(false); else if(urlManuallyEntered) {