}
}
-void TestViewer::eraseAll( bool isUpdate )
+void TestViewer::eraseAll( bool isUpdate, bool eraseStructures )
{
context()->CloseLocalContext( -1, Standard_False );
context()->EraseAll( isUpdate );
+ if( eraseStructures )
+ {
+ Graphic3d_MapOfStructure GmapS;
+ viewer()->getViewer3d()->StructureManager()->DisplayedStructures(GmapS);
+ for (Graphic3d_MapOfStructure::Iterator it(GmapS); it.More(); it.Next())
+ {
+ Handle(Graphic3d_Structure) GS = it.Key();
+ GS->Erase();
+ }
+ }
}
void TestViewer::show( const Handle(AIS_InteractiveObject)& theObject,
Handle(V3d_View) aView = myViewWindow->getViewPort()->getView();
context()->MoveTo( theViewX, theViewY, aView );
context()->Select();
- // context()->ClearLocalContext();
// context()->CloseAllContexts();
}
static OCCViewer_ViewFrame* viewWindow();
static Handle(AIS_InteractiveContext) context();
- static void eraseAll( bool isUpdate );
+ static void eraseAll( bool isUpdate, bool eraseStructures = false );
static void show( const Handle(AIS_InteractiveObject)& theObject,
int theMode, int theSelectionMode, bool isFitAll, const char* theKey );
static void show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const QColor& theColor,
TestViewer::show( aPrs, AIS_Shaded, 4, true, "LandCoverMap_PrsByTypes" );
// select one of faces (first)
TestViewer::select( 200, 300 );
- // CPPUNIT_ASSERT_IMAGES
-
+ CPPUNIT_ASSERT_IMAGES
+ TestViewer::eraseAll(true, true);
aDoc->Close();
}
#include <QTest>
void test_HYDROData_LandCoverMap::test_shp_import_cyp()
{
+ //TestViewer::eraseAll(true);
+
Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
QString aFileName = REF_DATA_PATH + "/cyprus_natural.shp";
HYDROData_ShapeFile anImporter;
LCM->StoreLandCovers(aMapFace2ST);
TestViewer::show( LCM->GetShape(), AIS_Shaded, true, "cyprus_natural_all" );
- QTest::qWait(100000);
CPPUNIT_ASSERT_IMAGES
aDoc->Close();
}