OpenKNX / Kaenx-Creator

Create your own KnxProd Files with UI.
MIT License
70 stars 20 forks source link

multiple module refs #13

Closed john30 closed 2 years ago

john30 commented 2 years ago

Describe the bug when adding a module definition more than once, it gets assigned the same ID and will prevent ETS from adding the device with error

To Reproduce Steps to reproduce the behavior:

  1. define a module
  2. add the module to the app dynamic more than once on top level
  3. export the knxprod
  4. import on ETS
  5. add the device to the device list and ETS will report duplicate key error

furthermore, when trying to use the "Zurücksetzen" button in the app dynamic module ref yields in the following exception:

Exception has occurred: CLR/System.Exception
An exception of type 'System.Exception' occurred in Kaenx.Creator.dll but was not handled in user code: 'Unbekannter Typ zum ID löschen: System.Windows.Controls.Button'
   at Kaenx.Creator.Controls.DynamicView.ResetId(Object sender, RoutedEventArgs e) in C:\Users\john\Desktop\Kaenx.Creator.git\Kaenx.Creator\Controls\DynamicView.xaml.cs:line 106

Expected behavior IDs are kept unique within the same class (here: module ref)

Screenshots none

Desktop (please complete the following information):

thewhobox commented 2 years ago

@john30 thanks for your report. I can't reproduce the bug with duplicate key. But i fixed the bug with the reset ID.

I created a module and added it to the RootNode: image My Module Dynamic looks like this: image

Maybe you can share a ae-manu file and the created knxprod where the bug happens with me?

john30 commented 2 years ago

seems to be gone with the latest sources, thanks anyway!