Россия
Joined: May 16, 2020
Post Count: 11
Status:
Offline
Check if item is selected.
Good day everyone. Spent hours in developers guide, trying to find out, how do check in plugin if PieceOfFurniture is selected.
Found only getSelectedItems() method, but maybe there is easier way to check it, intead of checking, if my items are in group?
If there is no easier way, would you be so kind to show me the exact code to check if items are in selected group. I'm not expert in java, so would really appreciate it.
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: Check if item is selected.
There’s no easier way, because there’s no getParent method in HomePieceOfFurniture class. You’ll have to find the group of each selected item when it doesn’t belong to the list returned by home.getFurniture().
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Россия
Joined: May 16, 2020
Post Count: 11
Status:
Offline
Re: Check if item is selected.
Emmanuel, Thank you very much for your reply. I know that it is very brazenly, but i ask you to help in making a code piece to obtain a list за selected furniture, by the algorithm you've described?