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:
Marco Bubke
2011-06-29 21:10:50 +02:00
parent 10fb989cf6
commit 25daed2f03
3 changed files with 5 additions and 4 deletions

View File

@@ -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()) {

View File

@@ -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()

View File

@@ -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);