{
// Check if face is selected
myAISContext->LocalContext()->InitSelected();
- if (!myAISContext->LocalContext()->MoreSelected())
+ if (!myAISContext->LocalContext()->MoreSelected() ||
+ myAISContext->SelectedShape().ShapeType() != TopAbs_FACE)
{
AfxMessageBox(_T("Choose the face and press the button again"),
MB_ICONINFORMATION | MB_OK);
{
// Check if face is selected
myAISContext->LocalContext()->InitSelected();
- if (!myAISContext->LocalContext()->MoreSelected())
+ if (!myAISContext->LocalContext()->MoreSelected() ||
+ myAISContext->SelectedShape().ShapeType() != TopAbs_FACE)
{
AfxMessageBox(_T("Choose the face and press the button again"),
MB_ICONINFORMATION | MB_OK);