mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0028890: Visualization - After closing all views and then display the view again, just the first view has object(s) displayed
DeviceLost flag has been moved from Graphic3d_GraphicDriver to Graphic3d_StructureManager, so that all Viewers sharing the same Driver instance are properly invalidated. Fixed clearing of objects by vclear command in case of multiple Viewers.
This commit is contained in:
@@ -244,21 +244,19 @@ void V3d_View::Redraw() const
|
||||
return;
|
||||
}
|
||||
|
||||
Handle(Graphic3d_GraphicDriver) aGraphicDriver = MyViewer->Driver();
|
||||
Handle(Graphic3d_StructureManager) aStructureMgr = MyViewer->StructureManager();
|
||||
for (Standard_Integer aRetryIter = 0; aRetryIter < 2; ++aRetryIter)
|
||||
{
|
||||
if (aGraphicDriver->IsDeviceLost())
|
||||
if (aStructureMgr->IsDeviceLost())
|
||||
{
|
||||
aStructureMgr->RecomputeStructures();
|
||||
aGraphicDriver->ResetDeviceLostFlag();
|
||||
}
|
||||
|
||||
AutoZFit();
|
||||
|
||||
myView->Redraw();
|
||||
|
||||
if (!aGraphicDriver->IsDeviceLost())
|
||||
if (!aStructureMgr->IsDeviceLost())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user