From: kgv Date: Mon, 2 Apr 2012 08:28:54 +0000 (+0400) Subject: 0022682: Draw options -v and -f do not influent to AISInitViewer command X-Git-Tag: V6_5_3~25 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=10d41e29b3e01e079bb0012b7e8686031786395c;p=occt-copy.git 0022682: Draw options -v and -f do not influent to AISInitViewer command Corrected ViewerTest_Tool::MakeViewer() - window was mapped before virtual flag was set. --- diff --git a/src/ViewerTest/ViewerTest_Tool.cxx b/src/ViewerTest/ViewerTest_Tool.cxx index 7390a93816..dea8fdb6b1 100755 --- a/src/ViewerTest/ViewerTest_Tool.cxx +++ b/src/ViewerTest/ViewerTest_Tool.cxx @@ -107,42 +107,29 @@ Standard_IMPORT Standard_Boolean Draw_VirtualWindows; //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 - - window = new WNT_Window (GetDevice(), - title, - Handle(WNT_WClass)::DownCast (ViewerTest::WClass()), - WS_OVERLAPPEDWINDOW, - 0,460,409,409, - Quantity_NOC_BLACK); - window->Map(); - -#else - window = new Xw_Window(GetDevice(), - title, - 0,460,409,409, - Xw_WQ_3DQUALITY, - Quantity_NOC_BLACK); + Handle(Aspect_Window) window = new WNT_Window (GetDevice(), theTitle, + Handle(WNT_WClass)::DownCast (ViewerTest::WClass()), + WS_OVERLAPPEDWINDOW, 0, 460, 409, 409, Quantity_NOC_BLACK); +#else + Handle(Aspect_Window) window = new Xw_Window (GetDevice(), theTitle, + 0, 460, 409, 409, Xw_WQ_3DQUALITY, Quantity_NOC_BLACK); #endif window->SetVirtual (Draw_VirtualWindows); + window->Map(); // Viewer - Handle(Aspect_GraphicDevice) theDevice = GetDevice(); TCollection_ExtendedString NameOfWindow("Visu3D"); Handle(V3d_Viewer) a3DViewer = new V3d_Viewer(theDevice,NameOfWindow.ToExtString()); - - a3DViewer->SetDefaultBackgroundColor(Quantity_NOC_BLACK); + a3DViewer->SetDefaultBackgroundColor(Quantity_NOC_BLACK); a3DViewer->SetDefaultLights(); - a3DViewer->SetLightOn(); - - // View + a3DViewer->SetLightOn(); + + // View Handle (V3d_View) V = a3DViewer->CreateView(); V->SetDegenerateModeOn(); V->SetWindow(window);