Mantis issue 0020435: EDF 909 GEOM : Show Only Selected.

This commit is contained in:
jfa 2009-11-18 09:55:07 +00:00
parent 1f857b0585
commit 0623aa4a9f
2 changed files with 44 additions and 1 deletions

View File

@ -991,6 +991,44 @@ SALOME_Prs* GEOM_Displayer::buildPresentation( const QString& entry,
return prs;
}
//=================================================================
/*!
* GEOM_Displayer::buildSubshapePresentation
* Builds/finds object's presentation for the current viewer
* Calls corresponding Update() method by means of double dispatch
* For not published objects (for Mantis issue 0020435)
*/
//=================================================================
SALOME_Prs* GEOM_Displayer::buildSubshapePresentation(const TopoDS_Shape& aShape,
const QString& entry,
SALOME_View* theViewFrame)
{
SALOME_Prs* prs = 0;
internalReset();
myViewFrame = theViewFrame ? theViewFrame : GetActiveView();
if (myViewFrame)
{
prs = LightApp_Displayer::buildPresentation(entry, theViewFrame);
if (prs)
{
Handle(SALOME_InteractiveObject) theIO = new SALOME_InteractiveObject();
theIO->setEntry(entry.toLatin1().constData());
if (!theIO.IsNull())
{
// set interactive object
setIO(theIO);
// finally set shape
setShape(aShape);
myType = GEOM_SUBSHAPE;
}
UpdatePrs(prs); // Update presentation by using of the double dispatch
}
}
return prs;
}
//=================================================================
/*!
* GEOM_Displayer::internalReset

View File

@ -155,9 +155,14 @@ public:
static SALOMEDS::Color getUniqueColor( const QList<SALOMEDS::Color>& );
/* Builds presentation of not published object */
virtual SALOME_Prs* buildSubshapePresentation(const TopoDS_Shape& aShape,
const QString&,
SALOME_View* = 0);
protected:
/* internal methods */
/* Builds presentation accordint to the current viewer type */
/* Builds presentation according to the current viewer type */
virtual SALOME_Prs* buildPresentation( const QString&, SALOME_View* = 0 );
/* Sets interactive object */