forked from qt-creator/qt-creator
Optimize checking keyframes in clipboard
Old implementation is expensive (~200ms) and this method is called frequently. Also prevent pasting keyframes in the FormEditor. Change-Id: Id083b553231893be31c7aab1d0da1809529316c8 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
#include <coreplugin/idocument.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <utils/algorithm.h>
|
||||
#include <timelineactions.h>
|
||||
|
||||
#include <qmljs/qmljsmodelmanagerinterface.h>
|
||||
|
||||
@@ -473,6 +474,9 @@ static void scatterItem(const ModelNode &pastedNode, const ModelNode &targetNode
|
||||
|
||||
void DesignDocument::paste()
|
||||
{
|
||||
if (TimelineActions::clipboardContainsKeyframes()) // pasting keyframes is handled in TimelineView
|
||||
return;
|
||||
|
||||
QScopedPointer<Model> pasteModel(DesignDocumentView::pasteToModel());
|
||||
|
||||
if (!pasteModel)
|
||||
|
||||
Reference in New Issue
Block a user