mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -71,7 +71,8 @@ void CLengthParamsEdgesPage::OnBnClickedEdge1Btn()
|
||||
// Now it's ok, local context is opened and edge selection mode is activated
|
||||
// Check if some edge is selected
|
||||
myAISContext->LocalContext()->InitSelected();
|
||||
if (!myAISContext->LocalContext()->MoreSelected())
|
||||
if (!myAISContext->LocalContext()->MoreSelected() ||
|
||||
myAISContext->SelectedShape().ShapeType() != TopAbs_EDGE)
|
||||
{
|
||||
AfxMessageBox(_T("Choose the edge and press the button again"),
|
||||
MB_ICONINFORMATION | MB_OK);
|
||||
@@ -91,7 +92,8 @@ void CLengthParamsEdgesPage::OnBnClickedEdge1Btn()
|
||||
void CLengthParamsEdgesPage::OnBnClickedEdge2Btn()
|
||||
{
|
||||
myAISContext->LocalContext()->InitSelected();
|
||||
if (!myAISContext->LocalContext()->MoreSelected())
|
||||
if (!myAISContext->LocalContext()->MoreSelected() ||
|
||||
myAISContext->SelectedShape().ShapeType() != TopAbs_EDGE)
|
||||
{
|
||||
AfxMessageBox (_T("Choose the edge and press the button again"),
|
||||
MB_ICONINFORMATION | MB_OK);
|
||||
|
Reference in New Issue
Block a user