diff options
| author | David Faure <[email protected]> | 2014-11-02 15:34:30 +0100 |
|---|---|---|
| committer | David Faure <[email protected]> | 2014-11-02 15:34:30 +0100 |
| commit | 98880e443048e327c83bd6d0c5d0d8aab2cb8fbb (patch) | |
| tree | bb4dde629134168b1454c1e356e289a0652b1a51 /src | |
| parent | 8b306b67bfcfec3bb042e4fcd6c89f2daa25cc08 (diff) | |
Update status of paste action once directory has finished loading.
Since 6a6cf1ab328e7600f0c2b375e43a1e3bd236a5a7, it depends on rootItem()
which is not available until the dirlister emits it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 7 | ||||
| -rw-r--r-- | src/dolphinmainwindow.h | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 49c234606..c9b559439 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -497,6 +497,11 @@ void DolphinMainWindow::updatePasteAction() pasteAction->setText(pasteInfo.second); } +void DolphinMainWindow::slotDirectoryLoadingCompleted() +{ + updatePasteAction(); +} + void DolphinMainWindow::selectAll() { clearStatusBar(); @@ -1427,6 +1432,8 @@ void DolphinMainWindow::connectViewSignals(DolphinViewContainer* container) this, &DolphinMainWindow::enableStopAction); connect(view, &DolphinView::directoryLoadingCompleted, this, &DolphinMainWindow::disableStopAction); + connect(view, &DolphinView::directoryLoadingCompleted, + this, &DolphinMainWindow::slotDirectoryLoadingCompleted); connect(view, &DolphinView::goBackRequested, this, static_cast<void(DolphinMainWindow::*)()>(&DolphinMainWindow::goBack)); connect(view, &DolphinView::goForwardRequested, diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 36a16e518..12933f9ce 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -432,6 +432,11 @@ private slots: */ void setUrlAsCaption(const QUrl& url); + /** + * Is called when the view has finished loading the directory. + */ + void slotDirectoryLoadingCompleted(); + private: void setupActions(); void setupDockWidgets(); |
