Paste is exception

Discussion forum for C++ and script developers who are using the QCAD development platform or who are looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files, scripts and screenshots.

Post one question per topic.

Post Reply
liguosheng
Active Member
Posts: 33
Joined: Thu Jan 14, 2016 4:17 am

Paste is exception

Post by liguosheng » Sat Mar 26, 2016 10:30 am

the actions of copy and cut are ok, when i paste the elentities by using the following code:
RPasteOperation *op = new RPasteOperation(getDocument()->getClipboard());
finally, the class of Rdocumentinterface is used to apply the operation by the following:
getDocumentInterface()->previewOperation(op);// it's preview

but there's a exception, when i debug it step by step, the exception happen to the following function:
RS::Unit RStorage::getUnit() const {
QSharedPointer<RDocumentVariables> v = queryDocumentVariablesDirect(); // exception happen
if (v.isNull()) {
return RS::None;
}
return v->getUnit();
}

why?

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”