mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Made the copy constuctor of SelectedItemSet call its virtual itemSelected/itemDeselected methods.
This commit is contained in:
parent
5b6eef15a4
commit
07afa76759
1 changed files with 14 additions and 2 deletions
|
|
@ -71,8 +71,20 @@ public:
|
|||
{
|
||||
if (selectedItems != other.selectedItems)
|
||||
{
|
||||
selectedItems = other.selectedItems;
|
||||
changed();
|
||||
|
||||
for (int i = selectedItems.size(); --i >= 0;)
|
||||
if (! other.isSelected (selectedItems.getReference (i)))
|
||||
itemDeselected (selectedItems.remove (i));
|
||||
|
||||
for (SelectableItemType* i = other.selectedItems.begin(), *e = other.selectedItems.begin(); i != e; ++i)
|
||||
{
|
||||
if (! isSelected (*i))
|
||||
{
|
||||
selectedItems.add (*i);
|
||||
itemSelected (*i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
|
@ -101,8 +113,8 @@ public:
|
|||
}
|
||||
else
|
||||
{
|
||||
deselectAll();
|
||||
changed();
|
||||
deselectAll();
|
||||
|
||||
selectedItems.add (item);
|
||||
itemSelected (item);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue