Western Europa
Joined: Mar 29, 2014
Post Count: 2614
Status:
Offline
Re: real time surface
I try to create a plugin that prints the current surface of all rooms dynamically. I start learning the compute surface plugin, ok I succeed in adding a roomlistener and it works. Nevertheless, this callback is called only at the beginning of the creation of a new room. Can I intercept any other updates like : point moved, drawing finished ? At present, the last room has a surface of zero. This value is updated only with the correct value when a new room is created
Hi,
I'm very interested in your plugin. Can you add as a test: adds the surface of the room if the button 'Display area' is checked stp ?
Please let us know.
I hope you distribute your plugin.
----------------------------------------
Evil progresses when good people do nothing! --- SH3D 7.1 and nothing else - W11 64b in 4K
France
Joined: Nov 7, 2005
Post Count: 9420
Status:
Offline
Re: real time surface
Adding a CollectionListener<Room> to home will inform you only on new and deleted rooms, as you noticed. If you want to listen to changes to the room points, you'll have to add a PropertyChangeListener on each room (and remove it when the room is deleted), and update your text area when the property name in the event is equal to Room.Property.POINTS.name().
[Please continue this thread in English because you started in English]
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator