MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / deleteSelection

Method deleteSelection

Engine/source/gui/editor/guiEditCtrl.cpp:1290–1312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1288//-----------------------------------------------------------------------------
1289
1290void 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

Callers 1

guiEditCtrl.cppFile · 0.45

Calls 5

getSelectedSetFunction · 0.85
getContentControlFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
addObjectMethod · 0.45

Tested by

no test coverage detected