Add warning when user tries to toggle construction with nothing

selected.

[git-p4: depot-paths = "//depot/solvespace/": change = 2097]
This commit is contained in:
Jonathan Westhues 2010-01-07 00:02:13 -08:00
parent 2eff68409e
commit ae5b297475

View File

@ -847,6 +847,10 @@ c:
case MNU_CONSTRUCTION: {
SS.UndoRemember();
SS.GW.GroupSelection();
if(SS.GW.gs.entities == 0) {
Error("No entities are selected. Select entities before "
"trying to toggle their construction state.");
}
int i;
for(i = 0; i < SS.GW.gs.entities; i++) {
hEntity he = SS.GW.gs.entity[i];