From c2bd4fabd6dd0a5e0bd4eac1c54c0e162a4993da Mon Sep 17 00:00:00 2001 From: dnk-88 Date: Mon, 23 Apr 2012 19:20:09 +0300 Subject: [PATCH] Changed: #1302 Fixed undo/redo bug (moving primitives). --- .../src/plugins/landscape_editor/pixmap_database.cpp | 1 + .../src/plugins/world_editor/property_editor_widget.cpp | 2 +- .../src/plugins/world_editor/world_editor_scene.cpp | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/pixmap_database.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/pixmap_database.cpp index 0156f5a53..15f8760be 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/pixmap_database.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/pixmap_database.cpp @@ -96,6 +96,7 @@ bool PixmapDatabase::loadPixmaps(const QString &zonePath, NLLIGO::CZoneBank &zon painter.end(); delete pixmap; m_pixmapMap.insert(zonePixmapName, emptyPixmap); + nlwarning(QString("not found " + zonePath + zonePixmapName + ".png").toStdString().c_str()); } // All pixmaps must be have same size else if (pixmap->width() != sizeX * m_textureSize) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/property_editor_widget.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/property_editor_widget.cpp index c5e2a2e0d..990f4935d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/property_editor_widget.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/property_editor_widget.cpp @@ -150,7 +150,7 @@ void PropertyEditorWidget::updateSelection(Node *node) prop = addConstStringArrayProperty(ligoProperty, parameter, primitive); else // hmn? - prop = addBoolProperty(parameter, primitive); + prop = addBoolProperty(ligoProperty, parameter, primitive); // Default value ? if ((ligoProperty == NULL) || (ligoProperty->Default)) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_scene.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_scene.cpp index c58102ac2..e24ef50e7 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_scene.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/world_editor/world_editor_scene.cpp @@ -227,6 +227,7 @@ void WorldEditorScene::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) } m_editedSelectedItems = false; + m_offset = QPointF(0, 0); m_angle = 0; m_scaleFactor = QPointF(1.0, 1.0); @@ -516,7 +517,8 @@ void WorldEditorScene::checkUndoPointsMode() void WorldEditorScene::updateWorldItemsMove(QGraphicsSceneMouseEvent *mouseEvent) { - QPointF offset(mouseEvent->scenePos() - mouseEvent->lastScenePos()); + QPointF offset = mouseEvent->scenePos() - mouseEvent->lastScenePos(); + m_offset += offset; if (m_pointsMode) Q_FOREACH(QGraphicsItem *item, m_selectedPoints) {