GrandOrgue / OdfEdit

A tool for GrandOrgue ODF edition, and Hauptwerk to GrandOrgue ODF conversion.
GNU General Public License v3.0
9 stars 1 forks source link

[feature] Create an object #15

Closed oleg68 closed 1 year ago

oleg68 commented 1 year ago

Now creating a new object (for example, Rank) with OdFEdit is quite difficult.

I'd like to have a Create button that would allow to specify the object type and to maintain the object counts.

For example, when I create a Rank object in a Stop, I expect the new Rank index would be allocated and the NumberOfRanks would be updated in both [Organ] and [Stop999] sections as well as add the Rank999 key in the [Stop999].

eturpault commented 1 year ago

Good idea, I add this to my TO DO list, thanks !

eturpault commented 1 year ago

Currently to create a new object the steps are : clear the edition area (right click on it and select "Clear all"), write the ID and attributes lines of the new object then press the button "Apply changes", the new object will be added to the ODF with none parent. I will think about how to implement your request. For sure the objects counters in Organ can be increased, but when one creates a Rank or a Stop, we don't indicate in this Rank or Stop to which Stop or Manual it belongs to respectively, I will try to find a handy way to do it anyway, like a dialog box to indicate which object one wants to create and under which existing parent object. A new object with a template of attributes corresponding to the object type to create could then be displayed in the edition area.

oleg68 commented 1 year ago

I will try to find a handy way to do it anyway, like a dialog box to indicate which object one wants to create and under which existing parent object.

A possible scenario could be

  1. Select a parent object (ex. Stop or Manual)
  2. Press a Create button
  3. Select an object type from a list of available objects.

Another way is to use a pop-up right-click menu on the parent object.

eturpault commented 1 year ago

Similarly when one deletes an object the references to it in other objects should be removed, and the counters updated accordingly.

eturpault commented 1 year ago

Hi @oleg68, I have completed the evolution that your requested, adding other possibilities around the objects management and linking between them. I added several buttons at the top of the edition area :

With all these actions, OdfEdit takes cares to update automatically the NumberOf attributes in the parent or Organ object and the referencing between the objects. In this new version I made also some GUI improvements, I added the support of the comments at the end of the lines and the "/" separator in the path. For the HW to GO conversion, now the visible objects of the main panel are described with PanelElement objects. Here is the v2.3 beta release, could you please test it and give me your feedback / remarks ? Thank you.

Edit : new v2.3 beta release, there was an issue in Linux with the one delivered before. This beta release fixes the missing ranks for Erfurt and Düren sample sets. OdfEdit-2.3-beta2-linux.zip

eturpault commented 1 year ago

Hi @oleg68 , here is a new v2.3 beta3 release with the following changes compared to the previous beta2 :

Please let me know if you have comments or if you have seen bugs or if you have requests for other features to add. OdfEdit-2.3-beta3-linux.zip In my Ubuntu virtual machine the GUI of OdfEdit renders bad with big buttons and text, whereas in Windows it is fine. I hope that in your Linux machine the look is good. I think to publish soon this v2.3 build.