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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user