mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +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:
@@ -76,7 +76,8 @@ void CAngleParamsVerticesPage::OnBnClickedVertex1Btn()
|
||||
// Now it's ok, local context is opened and edge selection mode is activated
|
||||
// Check if some vertex is selected
|
||||
myAISContext->LocalContext()->InitSelected();
|
||||
if (!myAISContext->LocalContext()->MoreSelected())
|
||||
if (!myAISContext->LocalContext()->MoreSelected() ||
|
||||
myAISContext->SelectedShape().ShapeType() != TopAbs_VERTEX)
|
||||
{
|
||||
AfxMessageBox (_T ("Choose the vertex and press the button again"),
|
||||
MB_ICONINFORMATION | MB_OK);
|
||||
@@ -95,7 +96,8 @@ void CAngleParamsVerticesPage::OnBnClickedVertex1Btn()
|
||||
void CAngleParamsVerticesPage::OnBnClickedVertex2Btn()
|
||||
{
|
||||
myAISContext->LocalContext()->InitSelected();
|
||||
if (!myAISContext->LocalContext()->MoreSelected())
|
||||
if (!myAISContext->LocalContext()->MoreSelected() ||
|
||||
myAISContext->SelectedShape().ShapeType() != TopAbs_VERTEX)
|
||||
{
|
||||
AfxMessageBox ( _T("Choose the vertex and press the button again"), MB_ICONINFORMATION | MB_OK);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user