mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-19 01:04:20 +00:00
Small change to method in RectanglePlacement and Drawable to use Rectangles instead of bare coordinates. Fix to make ValueTree::sort use an UndoManager, and to prevent different mouse buttons being interpreted as a double-click.
This commit is contained in:
parent
85c32498dc
commit
b80bb4bf38
15 changed files with 90 additions and 96 deletions
|
|
@ -512,6 +512,28 @@ void ValueTree::SharedObject::moveChild (int currentIndex, int newIndex, UndoMan
|
|||
}
|
||||
}
|
||||
|
||||
void ValueTree::SharedObject::reorderChildren (const ReferenceCountedArray <SharedObject>& newOrder, UndoManager* undoManager)
|
||||
{
|
||||
jassert (newOrder.size() == children.size());
|
||||
|
||||
if (undoManager == 0)
|
||||
{
|
||||
children = newOrder;
|
||||
sendChildChangeMessage();
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < children.size(); ++i)
|
||||
{
|
||||
if (children.getUnchecked(i) != newOrder.getUnchecked(i))
|
||||
{
|
||||
jassert (children.contains (newOrder.getUnchecked(i)));
|
||||
moveChild (children.indexOf (newOrder.getUnchecked(i)), i, undoManager);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool ValueTree::SharedObject::isEquivalentTo (const SharedObject& other) const
|
||||
{
|
||||
if (type != other.type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue