Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
fix FS#1358 - Pasting is possible in a locked layer
- Loading branch information
Showing
with
7 additions
and
0 deletions.
-
+7
−0
src/operations/RClipboardOperation.cpp
|
@@ -378,6 +378,13 @@ void RClipboardOperation::copyEntity( |
|
|
destEntity->setDocument(&dest); |
|
|
if (toCurrentLayer) { |
|
|
// paste to current layer: |
|
|
QSharedPointer<RLayer> currentLayer = dest.queryCurrentLayer(); |
|
|
Q_ASSERT(!currentLayer.isNull()); |
|
|
if (currentLayer->isLocked() || currentLayer->isFrozen()) { |
|
|
qWarning("RClipboardOperation::copyToDocument: current layer is locked or frozen"); |
|
|
transaction.fail(); |
|
|
return; |
|
|
} |
|
|
destEntity->setLayerId(dest.getCurrentLayerId()); |
|
|
} |
|
|
else { |
|
|