| 1288 | //----------------------------------------------------------------------------- |
| 1289 | |
| 1290 | void GuiEditCtrl::deleteSelection() |
| 1291 | { |
| 1292 | // Notify script for undo. |
| 1293 | |
| 1294 | onTrashSelection_callback( getSelectedSet() ); |
| 1295 | |
| 1296 | // Move all objects in selection to trash. |
| 1297 | |
| 1298 | Vector< GuiControl* >::iterator i; |
| 1299 | for( i = mSelectedControls.begin(); i != mSelectedControls.end(); i ++ ) |
| 1300 | { |
| 1301 | if( ( *i ) == getCurrentAddSet() ) |
| 1302 | setCurrentAddSet( getContentControl(), false ); |
| 1303 | |
| 1304 | mTrash->addObject( *i ); |
| 1305 | } |
| 1306 | |
| 1307 | clearSelection(); |
| 1308 | |
| 1309 | // Notify script it needs to update its views. |
| 1310 | |
| 1311 | onHierarchyChanged_callback(); |
| 1312 | } |
| 1313 | |
| 1314 | //----------------------------------------------------------------------------- |
| 1315 |
no test coverage detected