forked from qt-creator/qt-creator
QmlDesigner: improve setupContext calls
There was a massive slow down if the clippboard contained a complex qml element. Change-Id: I7b17cc9eab39bade6f2a0ec2f66c2dd2a6279e2d Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Thomas Hartmann
parent
b1c659ff85
commit
e61ec82b09
@@ -53,7 +53,7 @@ void DesignerActionManagerView::modelAboutToBeDetached(Model *model)
|
||||
|
||||
void DesignerActionManagerView::nodeCreated(const ModelNode &)
|
||||
{
|
||||
setupContext();
|
||||
setupContext(SelectionContext::UpdateMode::Fast);
|
||||
}
|
||||
|
||||
void DesignerActionManagerView::nodeRemoved(const ModelNode &, const NodeAbstractProperty &, AbstractView::PropertyChangeFlags)
|
||||
@@ -63,17 +63,17 @@ void DesignerActionManagerView::nodeRemoved(const ModelNode &, const NodeAbstrac
|
||||
|
||||
void DesignerActionManagerView::nodeAboutToBeReparented(const ModelNode &, const NodeAbstractProperty &, const NodeAbstractProperty &, AbstractView::PropertyChangeFlags)
|
||||
{
|
||||
setupContext();
|
||||
setupContext(SelectionContext::UpdateMode::Fast);
|
||||
}
|
||||
|
||||
void DesignerActionManagerView::nodeReparented(const ModelNode &, const NodeAbstractProperty &, const NodeAbstractProperty &, AbstractView::PropertyChangeFlags)
|
||||
{
|
||||
setupContext();
|
||||
setupContext(SelectionContext::UpdateMode::Fast);
|
||||
}
|
||||
|
||||
void DesignerActionManagerView::propertiesRemoved(const QList<AbstractProperty> &)
|
||||
{
|
||||
setupContext();
|
||||
setupContext(SelectionContext::UpdateMode::Fast);
|
||||
}
|
||||
|
||||
void DesignerActionManagerView::rootNodeTypeChanged(const QString &, int, int)
|
||||
@@ -96,7 +96,7 @@ void DesignerActionManagerView::rewriterEndTransaction()
|
||||
|
||||
void DesignerActionManagerView::currentStateChanged(const ModelNode &)
|
||||
{
|
||||
setupContext();
|
||||
setupContext(SelectionContext::UpdateMode::Fast);
|
||||
}
|
||||
|
||||
void DesignerActionManagerView::selectedNodesChanged(const QList<ModelNode> &selectedNodes, const QList<ModelNode> &)
|
||||
@@ -112,7 +112,7 @@ void DesignerActionManagerView::selectedNodesChanged(const QList<ModelNode> &sel
|
||||
|
||||
void DesignerActionManagerView::nodeOrderChanged(const NodeListProperty &, const ModelNode &, int)
|
||||
{
|
||||
setupContext();
|
||||
setupContext(SelectionContext::UpdateMode::Fast);
|
||||
}
|
||||
|
||||
void DesignerActionManagerView::importsChanged(const QList<Import> &, const QList<Import> &)
|
||||
@@ -127,21 +127,21 @@ void DesignerActionManagerView::setDesignerActionList(const QList<ActionInterfac
|
||||
|
||||
void DesignerActionManagerView::signalHandlerPropertiesChanged(const QVector<SignalHandlerProperty> &, AbstractView::PropertyChangeFlags)
|
||||
{
|
||||
setupContext();
|
||||
setupContext(SelectionContext::UpdateMode::Fast);
|
||||
}
|
||||
|
||||
void DesignerActionManagerView::variantPropertiesChanged(const QList<VariantProperty> &, AbstractView::PropertyChangeFlags propertyChangeFlag)
|
||||
{
|
||||
if (propertyChangeFlag == AbstractView::PropertiesAdded)
|
||||
setupContext();
|
||||
setupContext(SelectionContext::UpdateMode::Fast);
|
||||
else if (hasSingleSelectedModelNode())
|
||||
setupContext();
|
||||
setupContext(SelectionContext::UpdateMode::Fast);
|
||||
}
|
||||
|
||||
void DesignerActionManagerView::bindingPropertiesChanged(const QList<BindingProperty> &, AbstractView::PropertyChangeFlags propertyChangeFlag)
|
||||
{
|
||||
if (propertyChangeFlag == AbstractView::PropertiesAdded)
|
||||
setupContext();
|
||||
setupContext(SelectionContext::UpdateMode::Fast);
|
||||
}
|
||||
|
||||
void DesignerActionManagerView::instancePropertyChanged(const QList<QPair<ModelNode, PropertyName> > &)
|
||||
|
||||
Reference in New Issue
Block a user