Commit ac9cfa2f authored by Marlin Frickenschmidt's avatar Marlin Frickenschmidt

MovePlugin will no longer try to transform the selection in MoveSelection mode...

MovePlugin will no longer try to transform the selection in MoveSelection mode when the mouse moved without any button pressed.

Backups of the selection will only be created when something actually changed (transformation matrix != identity matrix).

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10730 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 328926a2
......@@ -589,11 +589,12 @@ void MovePlugin::manipulatorMoved( QtTranslationManipulatorNode* _node , QMouseE
if ( PluginFunctions::pickMode() != "Move"
&& PluginFunctions::pickMode() != "MoveSelection" )
return;
OpenFlipper::Options::redrawDisabled( true );
// Apply changes only on Release for moveMode and after every movement in MoveSelection Mode
if ( ((_event->type() == QEvent::MouseButtonRelease) || (PluginFunctions::pickMode() != "Move")) && !placeMode_) {
if ( !placeMode_ && ((_event->type() == QEvent::MouseButtonRelease) ||
(PluginFunctions::pickMode() != "Move" && _event->buttons() != Qt::NoButton)) ) {
int objectId = _node->getIdentifier();
......
......@@ -396,8 +396,9 @@ void MovePlugin::transform( int _objectId , Matrix4x4 _matrix ){
emit scriptInfo( "transform( ObjectId , Matrix4x4(" + matString + " ) )" );
// Create backup
emit createBackup(_objectId, "Transformation");
// Create backup if there was a change
if (!_matrix.is_identity())
emit createBackup(_objectId, "Transformation");
}
......@@ -486,8 +487,9 @@ void MovePlugin::transform( int _objectId , IdList _vHandles, Matrix4x4 _matrix
emit scriptInfo( "transform( ObjectId , Matrix4x4(" + matString + " ) )" );
// Create backup
emit createBackup(_objectId, "Transformation");
// Create backup if there was a change
if (!_matrix.is_identity())
emit createBackup(_objectId, "Transformation");
}
......@@ -572,8 +574,9 @@ void MovePlugin::transformVertexSelection( int _objectId , Matrix4x4 _matrix ){
emit scriptInfo( "transformVertexSelection( ObjectId , Matrix4x4(" + matString + " ) )" );
// Create backup
emit createBackup(_objectId, "Transformation of Vertex Selection");
// Create backup if there was a change
if (!_matrix.is_identity())
emit createBackup(_objectId, "Transformation of Vertex Selection");
}
......@@ -679,8 +682,9 @@ void MovePlugin::transformFaceSelection( int _objectId , Matrix4x4 _matrix ){
emit scriptInfo( "transformFaceSelection( ObjectId , Matrix4x4(" + matString + " ) )" );
// Create backup
emit createBackup(_objectId, "Transformation of Face Selection");
// Create backup if there was a change
if (!_matrix.is_identity())
emit createBackup(_objectId, "Transformation of Face Selection");
}
......@@ -802,8 +806,9 @@ void MovePlugin::transformEdgeSelection( int _objectId , Matrix4x4 _matrix ){
emit scriptInfo( "transformEdgeSelection( ObjectId , Matrix4x4(" + matString + " ) )" );
// Create backup
emit createBackup(_objectId, "Transformation of Edge Selection");
// Create backup if there was a change
if (!_matrix.is_identity())
emit createBackup(_objectId, "Transformation of Edge Selection");
}
//------------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment