| 82 | } |
| 83 | |
| 84 | void IPProcessGridScene::removeStep(IPProcessStep* step) |
| 85 | { |
| 86 | ((IPProcessGrid*) parent())->mainWindow()->setAllowChangeActiveProcessStep(false); |
| 87 | |
| 88 | // remove from image viewer window |
| 89 | ((IPProcessGrid*) parent())->mainWindow()->imageViewer()->removeProcessStep(step); |
| 90 | |
| 91 | // remove edges |
| 92 | while(!step->edgesIn()->empty()) |
| 93 | { |
| 94 | IPProcessEdge* edge = step->edgesIn()->first(); |
| 95 | removeEdge(edge); |
| 96 | } |
| 97 | |
| 98 | while(!step->edgesOut()->empty()) |
| 99 | { |
| 100 | IPProcessEdge* edge = step->edgesOut()->first(); |
| 101 | removeEdge(edge); |
| 102 | } |
| 103 | |
| 104 | // remove step |
| 105 | _steps.removeAll(step); |
| 106 | delete step; |
| 107 | |
| 108 | ((IPProcessGrid*) parent())->mainWindow()->setAllowChangeActiveProcessStep(true); |
| 109 | } |
| 110 | |
| 111 | bool IPProcessGridScene::addEdge(IPProcessEdge* edge) |
| 112 | { |
nothing calls this directly
no test coverage detected