Commit 688e60fb authored by Frédéric Larue's avatar Frédéric Larue

Function for the pre-allocation of display options added to DisplayableFactoryInterface.

parent 74269d54
......@@ -188,6 +188,16 @@ public:
virtual DisplayDoF viewerDoF() const = 0;
/** Creates an instance of a displayer object with the correct type. */
virtual DisplayableInterface* newDisplayer( GenericUIData *m, GLViewer *v ) const = 0;
inline void allocateDisplayOptions( GenericUIData *d ) const
{
DisplayableInterface *disp = newDisplayer( d, NULL );
UIParamSet *params = new UIParamSet( d->GetBaseName(), NULL );
disp->declareParameters( *params );
params->updateChildrenLists( d );
d->SetDisplayOptions( params );
delete disp;
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment