Commit 010e6a9e authored by Kai Koehne's avatar Kai Koehne
Browse files

Revert "QmlDesigner: crash fix for copy and paste"

Enable correct handling of imports again.
This reverts commit de610cac.
parent 2fa6d31a
...@@ -459,7 +459,7 @@ void DesignDocumentController::deleteSelected() ...@@ -459,7 +459,7 @@ void DesignDocumentController::deleteSelected()
void DesignDocumentController::copySelected() void DesignDocumentController::copySelected()
{ {
QScopedPointer<Model> model(Model::create("import Qt 4.7; Qt/Rectangle")); QScopedPointer<Model> model(Model::create("Qt/Rectangle"));
model->setMetaInfo(m_d->model->metaInfo()); model->setMetaInfo(m_d->model->metaInfo());
model->setFileUrl(m_d->model->fileUrl()); model->setFileUrl(m_d->model->fileUrl());
......
...@@ -170,9 +170,8 @@ void ModelMerger::replaceModel(const ModelNode &modelNode) ...@@ -170,9 +170,8 @@ void ModelMerger::replaceModel(const ModelNode &modelNode)
{ {
RewriterTransaction transaction(view()->beginRewriterTransaction()); RewriterTransaction transaction(view()->beginRewriterTransaction());
foreach (const Import &import, modelNode.model()->imports()) { foreach (const Import &import, modelNode.model()->imports())
//view()->model()->addImport(import); //### view()->model()->addImport(import);
}
view()->model()->setFileUrl(modelNode.model()->fileUrl()); view()->model()->setFileUrl(modelNode.model()->fileUrl());
ModelNode rootNode(view()->rootModelNode()); ModelNode rootNode(view()->rootModelNode());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment