1
0
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:
kgv
2017-07-07 17:06:09 +03:00
committed by bugmaster
parent 336a63f042
commit 851dacdbb9
16 changed files with 137 additions and 83 deletions

View File

@@ -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;
}