| 52 | } |
| 53 | |
| 54 | void IPProcessGridScene::deleteSelectedItems() |
| 55 | { |
| 56 | // close the settings window to prevent invalid pointers |
| 57 | ((IPProcessGrid*) parent())->mainWindow()->hideProcessSettings(); |
| 58 | ((IPProcessGrid*) parent())->mainWindow()->setAllowChangeActiveProcessStep(false); |
| 59 | |
| 60 | QList<QGraphicsItem*> selected = selectedItems(); |
| 61 | |
| 62 | // remove the items |
| 63 | while(!selected.empty()) |
| 64 | { |
| 65 | // only take selected steps, not other items |
| 66 | if(typeid(*selected.first()) == typeid(IPProcessStep)) |
| 67 | { |
| 68 | IPProcessStep* step = (IPProcessStep*) selected.first(); |
| 69 | removeStep(step); |
| 70 | } |
| 71 | selected.removeFirst(); |
| 72 | } |
| 73 | |
| 74 | ((IPProcessGrid*) parent())->mainWindow()->setActiveProcessStep(NULL); |
| 75 | ((IPProcessGrid*) parent())->mainWindow()->setAllowChangeActiveProcessStep(true); |
| 76 | } |
| 77 | |
| 78 | void IPProcessGridScene::addStep(IPProcessStep* step) |
| 79 | { |
no test coverage detected