Skip to content

Commit

Permalink
fix FS#1358 - Pasting is possible in a locked layer
Browse files Browse the repository at this point in the history
  • Loading branch information
qcad committed Jan 25, 2016
1 parent 9b16031 commit 0c6cd5c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/operations/RClipboardOperation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0c6cd5c

Please sign in to comment.