1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-07 18:30:55 +03:00

0022682: Draw options -v and -f do not influent to AISInitViewer command

Corrected ViewerTest_Tool::MakeViewer() - window
was mapped before virtual flag was set.
This commit is contained in:
kgv 2012-04-02 12:28:54 +04:00
parent 208e6839be
commit 10d41e29b3

@ -107,37 +107,24 @@ Standard_IMPORT Standard_Boolean Draw_VirtualWindows;
//purpose : //purpose :
//======================================================================= //=======================================================================
Handle(V3d_Viewer) ViewerTest_Tool::MakeViewer (const Standard_CString title) Handle(V3d_Viewer) ViewerTest_Tool::MakeViewer (const Standard_CString theTitle)
{ {
Handle(Aspect_Window) window;
#ifdef WNT #ifdef WNT
Handle(Aspect_Window) window = new WNT_Window (GetDevice(), theTitle,
window = new WNT_Window (GetDevice(), Handle(WNT_WClass)::DownCast (ViewerTest::WClass()),
title, WS_OVERLAPPEDWINDOW, 0, 460, 409, 409, Quantity_NOC_BLACK);
Handle(WNT_WClass)::DownCast (ViewerTest::WClass()),
WS_OVERLAPPEDWINDOW,
0,460,409,409,
Quantity_NOC_BLACK);
window->Map();
#else #else
window = new Xw_Window(GetDevice(), Handle(Aspect_Window) window = new Xw_Window (GetDevice(), theTitle,
title, 0, 460, 409, 409, Xw_WQ_3DQUALITY, Quantity_NOC_BLACK);
0,460,409,409,
Xw_WQ_3DQUALITY,
Quantity_NOC_BLACK);
#endif #endif
window->SetVirtual (Draw_VirtualWindows); window->SetVirtual (Draw_VirtualWindows);
window->Map();
// Viewer // Viewer
Handle(Aspect_GraphicDevice) theDevice = GetDevice(); Handle(Aspect_GraphicDevice) theDevice = GetDevice();
TCollection_ExtendedString NameOfWindow("Visu3D"); TCollection_ExtendedString NameOfWindow("Visu3D");
Handle(V3d_Viewer) a3DViewer = new V3d_Viewer(theDevice,NameOfWindow.ToExtString()); Handle(V3d_Viewer) a3DViewer = new V3d_Viewer(theDevice,NameOfWindow.ToExtString());
a3DViewer->SetDefaultBackgroundColor(Quantity_NOC_BLACK); a3DViewer->SetDefaultBackgroundColor(Quantity_NOC_BLACK);
a3DViewer->SetDefaultLights(); a3DViewer->SetDefaultLights();
a3DViewer->SetLightOn(); a3DViewer->SetLightOn();