From aca2078768518b8d3173129ce86acafddd99f525 Mon Sep 17 00:00:00 2001 From: rnv Date: Wed, 4 Aug 2021 15:04:46 +0300 Subject: [PATCH] Bos #24528: EDF 23831 - Bring to front --- src/OCCViewer/OCCViewer_VService.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/OCCViewer/OCCViewer_VService.cxx b/src/OCCViewer/OCCViewer_VService.cxx index 4ede419bb..c47f65fa5 100644 --- a/src/OCCViewer/OCCViewer_VService.cxx +++ b/src/OCCViewer/OCCViewer_VService.cxx @@ -65,17 +65,13 @@ Handle(V3d_Viewer) OCCViewer_VService::CreateViewer( const Standard_ExtString na const Standard_Boolean computedMode, const Standard_Boolean defaultComputedMode ) { - static Handle(OpenGl_GraphicDriver) aGraphicDriver; - if (aGraphicDriver.IsNull()) - { - Handle(Aspect_DisplayConnection) aDisplayConnection; + Handle(Aspect_DisplayConnection) aDisplayConnection; #if !defined WIN32 && !defined __APPLE__ - aDisplayConnection = new Aspect_DisplayConnection( displayName ); + aDisplayConnection = new Aspect_DisplayConnection( displayName ); #else - aDisplayConnection = new Aspect_DisplayConnection(); + aDisplayConnection = new Aspect_DisplayConnection(); #endif - aGraphicDriver = new OpenGl_GraphicDriver(aDisplayConnection); - } + Handle(OpenGl_GraphicDriver) aGraphicDriver = new OpenGl_GraphicDriver(aDisplayConnection); return new V3d_Viewer( aGraphicDriver, name, domain, viewSize, viewProjection, Quantity_NOC_GRAY30, V3d_ZBUFFER, V3d_GOURAUD, -- 2.39.2