mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +03:00
0025284: Problems with standard MFC samples
- OCAF sample Save Document option: corrected conversion from LPCTSTR to Standard_CString - HLR sample: corrected mouse move event handling for HLR 2D view; Corrected CSelectionDialog view displaying and updating - Geometry sample: CGeometryDoc correction to avoid code duplication - OCC_3dBaseDoc: corrected DragEvent() handler for proper emulation of rectangle selection. - Viewer3d sample: moved resource files (resource.h; resource.hm; AISToolbar.bmp) from /src to /res Code style changes Fixed "About" dialog error in release. Corrected dimension dialogs Workaround for dimensions sample: AIS_LocalContext::SelectedShape() doesn't take into account TopoDS shape local transformation, and operates with selected interactive transformation.
This commit is contained in:
@@ -78,7 +78,10 @@ void CLengthParamsEdgesPage::OnBnClickedEdge1Btn()
|
||||
return;
|
||||
}
|
||||
|
||||
myFirstEdge = TopoDS::Edge (myAISContext->LocalContext()->SelectedShape());
|
||||
// Workaround for AIS_LocalContext::SelectedShape()
|
||||
myFirstEdge = TopoDS::Edge (CDimensionDlg::SelectedShape());
|
||||
//myFirstEdge = TopoDS::Edge (myAISContext->LocalContext()->SelectedShape());
|
||||
|
||||
myAISContext->LocalContext()->ClearSelected();
|
||||
}
|
||||
|
||||
@@ -97,7 +100,10 @@ void CLengthParamsEdgesPage::OnBnClickedEdge2Btn()
|
||||
return;
|
||||
}
|
||||
|
||||
mySecondEdge = TopoDS::Edge (myAISContext->LocalContext()->SelectedShape());
|
||||
// Workaround for AIS_LocalContext::SelectedShape()
|
||||
mySecondEdge = TopoDS::Edge (CDimensionDlg::SelectedShape());
|
||||
//mySecondEdge = TopoDS::Edge (myAISContext->LocalContext()->SelectedShape());
|
||||
|
||||
myAISContext->LocalContext()->ClearSelected();
|
||||
|
||||
// Build plane through three points
|
||||
@@ -122,6 +128,7 @@ void CLengthParamsEdgesPage::OnBnClickedEdge2Btn()
|
||||
anAspect->TextAspect()->SetHeight (aDimDlg->GetFontHeight());
|
||||
anAspect->MakeTextShaded (aDimDlg->IsText3dShaded());
|
||||
anAspect->SetCommonColor (aDimDlg->GetDimensionColor());
|
||||
anAspect->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
if (myIsAngleDimension)
|
||||
{
|
||||
// Build an angle dimension between two non-parallel edges
|
||||
@@ -148,10 +155,9 @@ void CLengthParamsEdgesPage::OnBnClickedEdge2Btn()
|
||||
{
|
||||
Handle(AIS_LengthDimension) aLenDim = new AIS_LengthDimension (myFirstEdge, mySecondEdge, aPlane->Pln());
|
||||
aLenDim->SetDimensionAspect (anAspect);
|
||||
aLenDim->DimensionAspect()->MakeUnitsDisplayed (aDimDlg->IsUnitsDisplayed());
|
||||
aLenDim->SetFlyout (aDimDlg->GetFlyout());
|
||||
if (aDimDlg->IsUnitsDisplayed())
|
||||
{
|
||||
aLenDim->SetFlyout (aDimDlg->GetFlyout());
|
||||
aLenDim->SetDisplayUnits (aDimDlg->GetUnits());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user