clear the clipboard if undo deleted the partition that's in it
svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1129877
This commit is contained in:
parent
15e23d806e
commit
51ae5ddcb4
|
@ -724,6 +724,12 @@ void MainWindow::onUndoOperation()
|
|||
Log() << i18nc("@info/plain", "Undoing operation: %1", operationStack().operations().last()->description());
|
||||
operationStack().pop();
|
||||
|
||||
// it's possible the undo killed the partition in the clipboard. if there's a partition in the clipboard, try
|
||||
// to find a device for it (OperationStack::findDeviceForPartition() only compares pointers, so an invalid
|
||||
// pointer is not a problem). if no device is found, the pointer must be dangling, so clear the clipboard.
|
||||
if (pmWidget().clipboardPartition() != NULL && operationStack().findDeviceForPartition(pmWidget().clipboardPartition()) == NULL)
|
||||
pmWidget().setClipboardPartition(NULL);
|
||||
|
||||
pmWidget().updatePartitions();
|
||||
enableActions();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue