1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0028068: Samples - Add dimension functionality shows incorrect tip for an Edge in mfc Viewer3d

Warning message was updated to show actual information.
Additional checking of type of shape was added to prevent exceptions for Add Dimension functionality.
This commit is contained in:
ski
2016-11-08 17:26:23 +03:00
committed by apn
parent 2915f0b590
commit 71c089e99b
6 changed files with 21 additions and 11 deletions

View File

@@ -69,9 +69,10 @@ void CLengthParamsEdgePage::OnBnClickedChooseEdgeBtn()
{
myAISContext->LocalContext()->InitSelected();
if (!myAISContext->LocalContext()->MoreSelected())
if (!myAISContext->LocalContext()->MoreSelected() ||
myAISContext->SelectedShape().ShapeType() != TopAbs_EDGE)
{
AfxMessageBox ( _T("Choose the vertex and press the button again"), MB_ICONINFORMATION | MB_OK);
AfxMessageBox ( _T("Choose the edge and press the button again"), MB_ICONINFORMATION | MB_OK);
return;
}