Changed: #1302 Fixed undo/redo bug (moving primitives).

--HG--
branch : gsoc2011-worldeditorqt
hg/feature/sse2
dnk-88 13 years ago
parent 34b1f12bb8
commit d6731657c1

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

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

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

Loading…
Cancel
Save