softwareschneiderei / bwinpro

FVA-BW-Fork of the tree growth simulator BWINPro
GNU General Public License v2.0
3 stars 1 forks source link

Bug after closing 'Stand Data' window #7

Closed simschul closed 6 years ago

simschul commented 6 years ago

BWinPro 7.8-0.7

Describe the bug I have a stand loaded. When I open the 'Stand Data' window and close it again, all but one tree vanishes both from the 'Stand Info' table and the 'Stand map' pane.

To Reproduce Steps to reproduce the behavior:

  1. Load a stand (new or from .xml or MS access)
  2. Go to 'Edit' --> 'Stand Data'
  3. Close the window 'Stand Data' again
  4. Trees are gone (all but one)

IDE output openTreegrossXML edit Exception in thread "AWT-EventQueue-0" java.util.NoSuchElementException: No layer found for -9 at treegross.base.Layer.fromInt(Layer.java:27) at forestsimulator.standsimulation.EditorPanel.updateStand(EditorPanel.java:144) at forestsimulator.standsimulation.TgEditTreegross.formWindowClosed(TgEditTreegross.java:87) at forestsimulator.standsimulation.TgEditTreegross.access$000(TgEditTreegross.java:26) at forestsimulator.standsimulation.TgEditTreegross$1.windowClosed(TgEditTreegross.java:54) at java.awt.AWTEventMulticaster.windowClosed(AWTEventMulticaster.java:359) at java.awt.Window.processWindowEvent(Window.java:2057) at javax.swing.JDialog.processWindowEvent(JDialog.java:683) at java.awt.Window.processEvent(Window.java:2013) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2295) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

miq commented 6 years ago

There was a problem parsing the layer information from the tree table. This is fixed now by using a correct cell editor and the enum values directly.