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

This commit is contained in:
dnk-88 2012-04-23 19:20:09 +03:00
parent 3c09ce3ee8
commit c2bd4fabd6
3 changed files with 5 additions and 2 deletions

View file

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

View file

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

View file

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