1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-08 14:17:06 +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:
aba
2014-10-09 15:40:14 +04:00
committed by bugmaster
parent 679d38788d
commit 4716247158
51 changed files with 1103 additions and 1989 deletions

View File

@@ -5,27 +5,36 @@
#include <stdafx.h>
#include "OCC_3dDoc.h"
BEGIN_MESSAGE_MAP(OCC_3dDoc, OCC_3dBaseDoc)
ON_COMMAND(ID_OBJECT_DIM, OnObjectAddDimensions)
END_MESSAGE_MAP()
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
OCC_3dDoc::OCC_3dDoc()
OCC_3dDoc::OCC_3dDoc (bool theIsResultDialog)
: myDimensionDlg()
{
if (theIsResultDialog)
{
myCResultDialog.Create(CResultDialog::IDD,NULL);
myCResultDialog.Create(CResultDialog::IDD,NULL);
RECT dlgrect;
myCResultDialog.GetWindowRect(&dlgrect);
LONG width = dlgrect.right-dlgrect.left;
LONG height = dlgrect.bottom-dlgrect.top;
RECT MainWndRect;
AfxGetApp()->m_pMainWnd->GetWindowRect(&MainWndRect);
LONG left = MainWndRect.left+3;
LONG top = MainWndRect.top + 112;
myCResultDialog.MoveWindow(left,top,width,height);
RECT dlgrect;
myCResultDialog.GetWindowRect(&dlgrect);
LONG width = dlgrect.right-dlgrect.left;
LONG height = dlgrect.bottom-dlgrect.top;
RECT MainWndRect;
AfxGetApp()->m_pMainWnd->GetWindowRect(&MainWndRect);
LONG left = MainWndRect.left+3;
LONG top = MainWndRect.top + 112;
myCResultDialog.MoveWindow(left,top,width,height);
}
myDimensionDlg.SetContext (myAISContext);
myDimensionDlg.Create(CDimensionDlg::IDD, NULL);
}
OCC_3dDoc::~OCC_3dDoc()
@@ -36,7 +45,6 @@ OCC_3dDoc::~OCC_3dDoc()
void OCC_3dDoc::PocessTextInDialog (CString theTitle,
CString theMessage)
{
// aMessage+= "-------------------------------- END ----------------------------------------\n";
myCResultDialog.SetTitle (theTitle);
myCResultDialog.SetText (theMessage);
SetTitle (theTitle);
@@ -73,3 +81,10 @@ void OCC_3dDoc::SetDialogTitle(TCollection_AsciiString theTitle)
{
myCResultDialog.SetTitle(theTitle.ToCString());
}
void OCC_3dDoc::OnObjectAddDimensions()
{
//Add dimentions dialog is opened here
myDimensionDlg.ShowWindow(SW_SHOW);
myDimensionDlg.UpdateStandardMode ();
}