| 255 addMenuAction ("rotateZPos"); // Rotate +Z |
255 addMenuAction ("rotateZPos"); // Rotate +Z |
| 256 addMenuAction ("rotateZNeg"); // Rotate -Z |
256 addMenuAction ("rotateZNeg"); // Rotate -Z |
| 257 |
257 |
| 258 initMenu ("E&xternal Programs"); |
258 initMenu ("E&xternal Programs"); |
| 259 addMenuAction ("ytruder"); |
259 addMenuAction ("ytruder"); |
| |
260 addMenuAction ("rectifier"); |
| 260 |
261 |
| 261 #ifndef RELEASE |
262 #ifndef RELEASE |
| 262 // Debug menu |
263 // Debug menu |
| 263 initMenu ("&Debug"); |
264 initMenu ("&Debug"); |
| 264 addMenuAction ("addTestQuad"); // Add Test Quad |
265 addMenuAction ("addTestQuad"); // Add Test Quad |
| 405 addToolBarAction ("uncolorize"); |
406 addToolBarAction ("uncolorize"); |
| 406 addToolBarAction ("visibility"); |
407 addToolBarAction ("visibility"); |
| 407 |
408 |
| 408 initSingleToolBar ("External Programs"); |
409 initSingleToolBar ("External Programs"); |
| 409 addToolBarAction ("ytruder"); |
410 addToolBarAction ("ytruder"); |
| |
411 addToolBarAction ("rectifier"); |
| 410 |
412 |
| 411 initSingleToolBar ("Groups"); |
413 initSingleToolBar ("Groups"); |
| 412 |
414 |
| 413 // We need to create the group toolbar buttons manually so that we can |
415 // We need to create the group toolbar buttons manually so that we can |
| 414 // set a custom background for them. |
416 // set a custom background for them. |
| 944 |
946 |
| 945 contextMenu->exec (pos); |
947 contextMenu->exec (pos); |
| 946 } |
948 } |
| 947 |
949 |
| 948 // ============================================================================= |
950 // ============================================================================= |
| |
951 DelHistory* ForgeWindow::deleteSelection () { |
| |
952 vector<ulong> indices; |
| |
953 vector<LDObject*> cache, sel = g_win->sel (); |
| |
954 |
| |
955 for (LDObject* obj : sel) { |
| |
956 indices.push_back (obj->getIndex (g_curfile)); |
| |
957 cache.push_back (obj->clone ()); |
| |
958 |
| |
959 g_curfile->forgetObject (obj); |
| |
960 delete obj; |
| |
961 } |
| |
962 |
| |
963 if (indices.size () > 0) |
| |
964 return new DelHistory (indices, cache); |
| |
965 |
| |
966 return null; |
| |
967 } |
| |
968 |
| |
969 // ============================================================================= |
| 949 void ObjectList::contextMenuEvent (QContextMenuEvent* ev) { |
970 void ObjectList::contextMenuEvent (QContextMenuEvent* ev) { |
| 950 g_win->spawnContextMenu (ev->globalPos ()); |
971 g_win->spawnContextMenu (ev->globalPos ()); |
| 951 } |
972 } |
| 952 |
973 |
| 953 // ============================================================================= |
974 // ============================================================================= |