View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001456||OpenMPT||General||public||2021-05-06 17:07||2022-01-09 13:31|
|Reporter||Saga Musix||Assigned To|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Target Version||OpenMPT 1.?? (long term goals)|
|Summary||0001456: Rethink mod conversion|
Currently, converting between various module formats can have surprising results, e.g. when invoking Undo. It's probably known to most users that this kind of conversion is almost always lossy, but the results can still be surprising.
Alternative approaches should be explored, e.g. always creating a new CModDoc as a result of a format change. This way, the old module would stay open and editable, and the user can more easily compare what has changed. If a conversion is more lossy than the user expected, they can still easily go back to the previous state even if they forgot to save the file before conversion. Technically this approach would require some refactoring because many objects cannot simply be copied between different CSoundFiles.
|Tags||No tags attached.|
|Has the bug occurred in previous versions?|
|Tested code revision (in case you know it)|
The logical step would be to implement a working copy-constructor for CSoundFile, and nothing else. Then, nothing of the existing conversion code would even need to be touched.
One important thing to keep in mind is that plugins cannot simply be "copied"; their state has to be serialized, a new instance has to be created and then the state needs to be unserialized again. As this is a non-const operation on the copied-from object, and a potentially expensive one, this should probably be rather implemented as a member function than as an actual copy constructor. Alternatively, the copy constructor wouldn't try copying over plugin state, and also not instantiate any of the copied-over plugins, and it would be the responsibility of the caller to do both.
|2021-05-06 17:07||Saga Musix||New Issue|
|2021-05-06 17:13||manx||Note Added: 0004758|
|2021-05-06 17:13||manx||Relationship added||related to 0001112|
|2021-05-06 17:14||manx||Target Version||=> OpenMPT 1.?? (long term goals)|
|2021-11-02 20:28||Saga Musix||Note Added: 0004894|
|2022-01-09 13:31||Saga Musix||Relationship added||related to 0001544|