mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Update the "Paste" action only if it is necessary
Updating this action is only required if the clipboard contents change, or if the "is writable" state of the current location changes. In all other cases, an update of this action should be prevented because it can be very expensive if many files are in the clipboard. In particular, the update when the selection changes could make changing the current item in the view very slow. BUG: 333903 REVIEW: 117782 FIXED-IN: 4.13.1
This commit is contained in:
parent
5f29eec075
commit
4660ea3a48
1 changed files with 3 additions and 1 deletions
|
@ -217,6 +217,7 @@ DolphinMainWindow::DolphinMainWindow() :
|
||||||
toggleSplitView();
|
toggleSplitView();
|
||||||
}
|
}
|
||||||
updateEditActions();
|
updateEditActions();
|
||||||
|
updatePasteAction();
|
||||||
updateViewActions();
|
updateViewActions();
|
||||||
updateGoActions();
|
updateGoActions();
|
||||||
|
|
||||||
|
@ -356,6 +357,7 @@ void DolphinMainWindow::changeUrl(const KUrl& url)
|
||||||
if (view) {
|
if (view) {
|
||||||
view->setUrl(url);
|
view->setUrl(url);
|
||||||
updateEditActions();
|
updateEditActions();
|
||||||
|
updatePasteAction();
|
||||||
updateViewActions();
|
updateViewActions();
|
||||||
updateGoActions();
|
updateGoActions();
|
||||||
setUrlAsCaption(url);
|
setUrlAsCaption(url);
|
||||||
|
@ -1455,6 +1457,7 @@ void DolphinMainWindow::setActiveViewContainer(DolphinViewContainer* viewContain
|
||||||
|
|
||||||
updateHistory();
|
updateHistory();
|
||||||
updateEditActions();
|
updateEditActions();
|
||||||
|
updatePasteAction();
|
||||||
updateViewActions();
|
updateViewActions();
|
||||||
updateGoActions();
|
updateGoActions();
|
||||||
|
|
||||||
|
@ -1817,7 +1820,6 @@ void DolphinMainWindow::updateEditActions()
|
||||||
deleteWithTrashShortcut->setEnabled(capabilities.supportsDeleting() && !enableMoveToTrash);
|
deleteWithTrashShortcut->setEnabled(capabilities.supportsDeleting() && !enableMoveToTrash);
|
||||||
cutAction->setEnabled(capabilities.supportsMoving());
|
cutAction->setEnabled(capabilities.supportsMoving());
|
||||||
}
|
}
|
||||||
updatePasteAction();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DolphinMainWindow::updateViewActions()
|
void DolphinMainWindow::updateViewActions()
|
||||||
|
|
Loading…
Reference in a new issue