1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-07 04:10:08 +00:00

Small additions to ValueTree, Rectangle, AudioDeviceSelectorComponent. Jucer development.

This commit is contained in:
Julian Storer 2010-04-20 20:30:29 +01:00
parent e663b1a04c
commit 39ced6543a
23 changed files with 1730 additions and 1086 deletions

View file

@ -113,9 +113,16 @@ public:
bool undo()
{
if (isDeleting)
{
target->addChild (child, childIndex, 0);
}
else
{
// If you hit this, it seems that your object's state is getting confused - probably
// because you've interleaved some undoable and non-undoable operations?
jassert (childIndex < target->children.size());
target->removeChild (childIndex, 0);
}
return true;
}
@ -356,6 +363,9 @@ void ValueTree::SharedObject::addChild (SharedObject* child, int index, UndoMana
}
else
{
if (index < 0)
index = children.size();
undoManager->perform (new ValueTreeChildChangeAction (this, index, child));
}
}
@ -396,7 +406,12 @@ void ValueTree::SharedObject::removeAllChildren (UndoManager* const undoManager)
//==============================================================================
ValueTree ValueTree::invalid (static_cast <ValueTree::SharedObject*> (0));
ValueTree::ValueTree() throw()
: object (0)
{
}
const ValueTree ValueTree::invalid;
ValueTree::ValueTree (const String& type_)
: object (new ValueTree::SharedObject (type_))