mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-08 04:20:09 +00:00
Fixed a typo in ToolBar dragging.
This commit is contained in:
parent
0db3ccf3e6
commit
446de5ff17
1 changed files with 4 additions and 4 deletions
|
|
@ -591,8 +591,8 @@ void Toolbar::itemDragMove (const SourceDetails& dragSourceDetails)
|
|||
{
|
||||
const Rectangle<int> previousPos (animator.getComponentDestination (prev));
|
||||
|
||||
if (abs (dragObjectLeft - (vertical ? previousPos.getY() : previousPos.getX())
|
||||
< abs (dragObjectRight - (vertical ? current.getBottom() : current.getRight()))))
|
||||
if (std::abs (dragObjectLeft - (vertical ? previousPos.getY() : previousPos.getX()))
|
||||
< std::abs (dragObjectRight - (vertical ? current.getBottom() : current.getRight())))
|
||||
{
|
||||
newIndex = getIndexOfChildComponent (prev);
|
||||
}
|
||||
|
|
@ -602,8 +602,8 @@ void Toolbar::itemDragMove (const SourceDetails& dragSourceDetails)
|
|||
{
|
||||
const Rectangle<int> nextPos (animator.getComponentDestination (next));
|
||||
|
||||
if (abs (dragObjectLeft - (vertical ? current.getY() : current.getX())
|
||||
> abs (dragObjectRight - (vertical ? nextPos.getBottom() : nextPos.getRight()))))
|
||||
if (std::abs (dragObjectLeft - (vertical ? current.getY() : current.getX()))
|
||||
> std::abs (dragObjectRight - (vertical ? nextPos.getBottom() : nextPos.getRight())))
|
||||
{
|
||||
newIndex = getIndexOfChildComponent (next) + 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue