Permalink
Browse files

fix FS#1358 - Pasting is possible in a locked layer

  • Loading branch information...
qcad committed Jan 25, 2016
1 parent 9b16031 commit 0c6cd5cad9c9246184e29fd993f2fd06f1d6dd6a
Showing with 7 additions and 0 deletions.
  1. +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 {

0 comments on commit 0c6cd5c

Please sign in to comment.