181 } |
181 } |
182 |
182 |
183 // ============================================================================= |
183 // ============================================================================= |
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
185 // ============================================================================= |
185 // ============================================================================= |
|
186 MAKE_ACTION (selectAll, "Select All", "select-all", "Selects all objects.", CTRL (A)) { |
|
187 g_ForgeWindow->sel.clear (); |
|
188 |
|
189 for (LDObject* obj : g_CurrentFile->objects) |
|
190 g_ForgeWindow->sel.push_back (obj); |
|
191 |
|
192 g_ForgeWindow->updateSelection (); |
|
193 } |
|
194 |
|
195 // ============================================================================= |
186 MAKE_ACTION (selectByColor, "Select by Color", "select-color", |
196 MAKE_ACTION (selectByColor, "Select by Color", "select-color", |
187 "Select all objects by the given color.", CTRL_SHIFT (A)) |
197 "Select all objects by the given color.", CTRL_SHIFT (A)) |
188 { |
198 { |
189 short dColor = g_ForgeWindow->getSelectedColor (); |
199 short dColor = g_ForgeWindow->getSelectedColor (); |
190 |
200 |
197 g_ForgeWindow->sel.push_back (obj); |
207 g_ForgeWindow->sel.push_back (obj); |
198 |
208 |
199 g_ForgeWindow->updateSelection (); |
209 g_ForgeWindow->updateSelection (); |
200 } |
210 } |
201 |
211 |
|
212 // ============================================================================= |
202 MAKE_ACTION (selectByType, "Select by Type", "select-type", |
213 MAKE_ACTION (selectByType, "Select by Type", "select-type", |
203 "Select all objects by the given type.", (0)) |
214 "Select all objects by the given type.", (0)) |
204 { |
215 { |
205 if (g_ForgeWindow->sel.size () == 0) |
216 if (g_ForgeWindow->sel.size () == 0) |
206 return; |
217 return; |