X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_Displayer.cpp;h=7e690a0f1d1acf6a414c13d839b025026c5ce885;hb=814a346c0ef4b2625779c5ef96be5ff87980acbb;hp=a84c76a0868c9d8729ffc11d2acb07552c053c09;hpb=227323fca46747847e850a1d6e3bdaac882e209e;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index a84c76a08..7e690a0f1 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -77,6 +77,7 @@ #include #include +#include #ifdef TINSPECTOR #include @@ -105,7 +106,11 @@ const int MOUSE_SENSITIVITY_IN_PIXEL = 10; void displayedObjects(const Handle(AIS_InteractiveContext)& theAIS, AIS_ListOfInteractive& theList) { // Get from null point - theAIS->DisplayedObjects(theList, true); +#if OCC_VERSION_HEX < 0x070400 + theAIS->DisplayedObjects(theList, true); +#else + theAIS->DisplayedObjects(theList); +#endif } QString qIntListInfo(const QIntList& theValues, const QString& theSeparator = QString(", ")) @@ -200,8 +205,6 @@ bool XGUI_Displayer::display(ObjectPtr theObject, AISObjectPtr theAIS, //bool isCustomized = customizeObject(theObject); int aDispMode = isShading? Shading : Wireframe; - if (isShading) - anAISIO->Attributes()->SetFaceBoundaryDraw( Standard_True ); anAISIO->SetDisplayMode(aDispMode); aContext->Display(anAISIO, aDispMode, 0, false, true, AIS_DS_Displayed); #ifdef TINSPECTOR @@ -312,6 +315,11 @@ bool XGUI_Displayer::redisplay(ObjectPtr theObject, bool theUpdateViewer) double aTransparency = ModelAPI_Tools::getTransparency(aResult); if ((aTransparency >= 0) && (aTransparency != aAISObj->getTransparency())) aAISObj->setTransparency(aTransparency); + + // Set Iso-Lines + Handle(ModuleBase_ResultPrs) aResPrs = Handle(ModuleBase_ResultPrs)::DownCast(aAISIO); + if (!aResPrs.IsNull()) + aResPrs->updateIsoLines(); } myWorkshop->module()->storeSelection(); @@ -570,7 +578,8 @@ ObjectPtr XGUI_Displayer::getObject(const Handle(AIS_InteractiveObject)& theIO) if (!theIO.IsNull()) { anAISObj->setImpl(new Handle(AIS_InteractiveObject)(theIO)); } - anObject = myWorkshop->module()->findPresentedObject(anAISObj); + if (myWorkshop->module()) + anObject = myWorkshop->module()->findPresentedObject(anAISObj); } return anObject; } @@ -621,15 +630,16 @@ Handle(AIS_InteractiveContext) XGUI_Displayer::AISContext() const myContextId = aContext.get(); if (!myWorkshop->selectionActivate()->isTrihedronActive()) selectionActivate()->deactivateTrihedron(true); - aContext->DefaultDrawer()->VIsoAspect()->SetNumber(0); - aContext->DefaultDrawer()->UIsoAspect()->SetNumber(0); + // Do not modify default drawer. The same is done in ModuleBase_ResultPrs + //aContext->DefaultDrawer()->VIsoAspect()->SetNumber(0); + //aContext->DefaultDrawer()->UIsoAspect()->SetNumber(0); //Handle(AIS_Trihedron) aTrihedron = myWorkshop->viewer()->trihedron(); //aTrihedron->getHighlightPointAspect()->SetScale(2.0); //aTrihedron->getHighlightPointAspect()->SetTypeOfMarker(Aspect_TOM_O_STAR); // Commented out according to discussion in bug #2825 - //ModuleBase_IViewer::DefaultHighlightDrawer = aContext->HighlightStyle(); + ModuleBase_IViewer::DefaultHighlightDrawer = aContext->HighlightStyle(); //Handle(Prs3d_Drawer) aSelStyle = aContext->SelectionStyle(); //double aDeflection = // QString(ModelAPI_ResultConstruction::DEFAULT_DEFLECTION().c_str()).toDouble();