src/toolsets/movetoolset.cpp

changeset 978
4603d8fd063e
parent 971
c00f9665a9f8
child 981
5d5d84ab2c48
equal deleted inserted replaced
977:dc3ceb65cda7 978:4603d8fd063e
25 MoveToolset::MoveToolset (MainWindow* parent) : 25 MoveToolset::MoveToolset (MainWindow* parent) :
26 Toolset (parent) {} 26 Toolset (parent) {}
27 27
28 void MoveToolset::moveSelection (bool up) 28 void MoveToolset::moveSelection (bool up)
29 { 29 {
30 LDObjectList objs = Selection(); 30 LDObjectList objs = selectedObjects();
31 LDObject::moveObjects (objs, up); 31 LDObject::moveObjects (objs, up);
32 m_window->buildObjList(); 32 m_window->buildObjList();
33 } 33 }
34 34
35 void MoveToolset::moveUp() 35 void MoveToolset::moveUp()
63 void MoveToolset::moveObjects (Vertex vect) 63 void MoveToolset::moveObjects (Vertex vect)
64 { 64 {
65 // Apply the grid values 65 // Apply the grid values
66 vect *= gridCoordinateSnap(); 66 vect *= gridCoordinateSnap();
67 67
68 for (LDObject* obj : Selection()) 68 for (LDObject* obj : selectedObjects())
69 obj->move (vect); 69 obj->move (vect);
70 } 70 }
71 71
72 void MoveToolset::moveXNeg() 72 void MoveToolset::moveXNeg()
73 { 73 {
104 return (Pi * gridAngleSnap()) / 180; 104 return (Pi * gridAngleSnap()) / 180;
105 } 105 }
106 106
107 void MoveToolset::rotateXPos() 107 void MoveToolset::rotateXPos()
108 { 108 {
109 RotateObjects (1, 0, 0, getRotateActionAngle(), Selection()); 109 RotateObjects (1, 0, 0, getRotateActionAngle(), selectedObjects());
110 } 110 }
111 111
112 void MoveToolset::rotateYPos() 112 void MoveToolset::rotateYPos()
113 { 113 {
114 RotateObjects (0, 1, 0, getRotateActionAngle(), Selection()); 114 RotateObjects (0, 1, 0, getRotateActionAngle(), selectedObjects());
115 } 115 }
116 116
117 void MoveToolset::rotateZPos() 117 void MoveToolset::rotateZPos()
118 { 118 {
119 RotateObjects (0, 0, 1, getRotateActionAngle(), Selection()); 119 RotateObjects (0, 0, 1, getRotateActionAngle(), selectedObjects());
120 } 120 }
121 121
122 void MoveToolset::rotateXNeg() 122 void MoveToolset::rotateXNeg()
123 { 123 {
124 RotateObjects (-1, 0, 0, getRotateActionAngle(), Selection()); 124 RotateObjects (-1, 0, 0, getRotateActionAngle(), selectedObjects());
125 } 125 }
126 126
127 void MoveToolset::rotateYNeg() 127 void MoveToolset::rotateYNeg()
128 { 128 {
129 RotateObjects (0, -1, 0, getRotateActionAngle(), Selection()); 129 RotateObjects (0, -1, 0, getRotateActionAngle(), selectedObjects());
130 } 130 }
131 131
132 void MoveToolset::rotateZNeg() 132 void MoveToolset::rotateZNeg()
133 { 133 {
134 RotateObjects (0, 0, -1, getRotateActionAngle(), Selection()); 134 RotateObjects (0, 0, -1, getRotateActionAngle(), selectedObjects());
135 } 135 }
136 136
137 void MoveToolset::configureRotationPoint() 137 void MoveToolset::configureRotationPoint()
138 { 138 {
139 ConfigureRotationPoint(); 139 ConfigureRotationPoint();

mercurial