forked from qt-creator/qt-creator
QmlDesigner: Fix wrong position for reparenting
Task-number: QTCREATORBUG-3962 Change-Id: Id583e257aa1c1645cb53a8ae32f83717df9b0617 Reviewed-on: http://codereview.qt.nokia.com/926 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Marco Bubke <marco.bubke@nokia.com>
This commit is contained in:
@@ -164,14 +164,14 @@ void Qt4InformationNodeInstanceServer::collectItemChangesAndSendChangeCommands()
|
||||
if (!informationChangedInstanceSet.isEmpty())
|
||||
nodeInstanceClient()->informationChanged(createAllInformationChangedCommand(informationChangedInstanceSet.toList()));
|
||||
|
||||
if (!propertyChangedList.isEmpty())
|
||||
nodeInstanceClient()->valuesChanged(createValuesChangedCommand(propertyChangedList));
|
||||
|
||||
if (!m_parentChangedSet.isEmpty()) {
|
||||
sendChildrenChangedCommand(m_parentChangedSet.toList());
|
||||
m_parentChangedSet.clear();
|
||||
}
|
||||
|
||||
if (!propertyChangedList.isEmpty())
|
||||
nodeInstanceClient()->valuesChanged(createValuesChangedCommand(propertyChangedList));
|
||||
|
||||
if (adjustSceneRect) {
|
||||
QRectF boundingRect = rootNodeInstance().boundingRect();
|
||||
if (boundingRect.isValid()) {
|
||||
|
||||
@@ -88,6 +88,7 @@ void MoveManipulator::setItems(const QList<FormEditorItem*> &itemList)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MoveManipulator::synchronizeParent(const QList<FormEditorItem*> &itemList, const ModelNode &parentNode)
|
||||
{
|
||||
bool snapperUpdated = false;
|
||||
@@ -114,7 +115,6 @@ void MoveManipulator::synchronizeInstanceParent(const QList<FormEditorItem*> &it
|
||||
{
|
||||
if (m_view->model() && !m_itemList.isEmpty())
|
||||
synchronizeParent(itemList, m_itemList.first()->qmlItemNode().instanceParent());
|
||||
|
||||
}
|
||||
|
||||
void MoveManipulator::updateHashes()
|
||||
|
||||
@@ -71,6 +71,7 @@ public:
|
||||
void setItem(FormEditorItem* item);
|
||||
void synchronizeInstanceParent(const QList<FormEditorItem*> &itemList);
|
||||
void synchronizeParent(const QList<FormEditorItem*> &itemList, const ModelNode &parentNode);
|
||||
|
||||
void begin(const QPointF& beginPoint);
|
||||
void update(const QPointF& updatePoint, Snapping useSnapping, State stateToBeManipulated = UseActualState);
|
||||
void reparentTo(FormEditorItem *newParent);
|
||||
|
||||
Reference in New Issue
Block a user