Fixes to Switch so that it defaults to adding children switched on, and adds
a flag to control whether children and added as true or false.
This commit is contained in:
@@ -28,8 +28,14 @@ class SG_EXPORT Switch : public Group
|
||||
|
||||
virtual void traverse(NodeVisitor& nv);
|
||||
|
||||
void setNewChildDefaultValue(bool value) { _newChildDefaultValue = value; }
|
||||
|
||||
bool getNewChildDefaultValue() const { return _newChildDefaultValue; }
|
||||
|
||||
virtual bool addChild( Node *child );
|
||||
|
||||
virtual bool addChild( Node *child, bool value );
|
||||
|
||||
virtual bool removeChild( Node *child );
|
||||
|
||||
void setValue(unsigned int pos,bool value);
|
||||
@@ -73,7 +79,8 @@ class SG_EXPORT Switch : public Group
|
||||
virtual ~Switch() {}
|
||||
|
||||
// this is effectively a bit mask.
|
||||
ValueList _values;
|
||||
bool _newChildDefaultValue;
|
||||
ValueList _values;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user