mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-10-31 23:26:43 +00:00 
			
		
		
		
	Group the commands with begin/end macros.
This commit is contained in:
		
							parent
							
								
									bf5ba41223
								
							
						
					
					
						commit
						092080c69c
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -7,6 +7,7 @@ | |||
| 
 | ||||
| #include <QMouseEvent> | ||||
| #include <QElapsedTimer> | ||||
| #include <QObject> | ||||
| 
 | ||||
| #include "../../model/settings/usersettings.hpp" | ||||
| #include "../../model/world/commands.hpp" | ||||
|  | @ -231,12 +232,14 @@ namespace CSVRender | |||
|                         // use the saved scene node name since the physics model has not moved yet
 | ||||
|                         std::string referenceId = mPhysics->sceneNodeToRefId(mGrabbedSceneNode); | ||||
| 
 | ||||
|                         mParent->mDocument.getUndoStack().beginMacro (QObject::tr("Move Object")); | ||||
|                         mParent->mDocument.getUndoStack().push(new CSMWorld::ModifyCommand(*mIdTableModel, | ||||
|                             mIdTableModel->getModelIndex(referenceId, mColIndexPosX), pos.x)); | ||||
|                         mParent->mDocument.getUndoStack().push(new CSMWorld::ModifyCommand(*mIdTableModel, | ||||
|                             mIdTableModel->getModelIndex(referenceId, mColIndexPosY), pos.y)); | ||||
|                         mParent->mDocument.getUndoStack().push(new CSMWorld::ModifyCommand(*mIdTableModel, | ||||
|                             mIdTableModel->getModelIndex(referenceId, mColIndexPosZ), pos.z)); | ||||
|                         mParent->mDocument.getUndoStack().endMacro(); | ||||
| 
 | ||||
|                         // FIXME: highlight current object?
 | ||||
|                         //mCurrentObj = mGrabbedSceneNode; // FIXME: doesn't work?
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue