View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000762 | OpenMPT | General | public | 2016-03-23 19:47 | 2016-03-28 21:51 |
| Reporter | chris82 | Assigned To | Saga Musix | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | OpenMPT 1.25.04.00 / libopenmpt 0.2-beta16 (upgrade first) | ||||
| Target Version | OpenMPT 1.26.01.00 / libopenmpt 0.2-beta17 (upgrade first) | Fixed in Version | OpenMPT 1.26.01.00 / libopenmpt 0.2-beta17 (upgrade first) | ||
| Summary | 0000762: Allow saving without changing extension | ||||
| Description | When you try to save a module which doesn't have the proper extension, openMpt add the extension at the end. The patch attached affect only "save", and not "save as" so it doesn't break anything. | ||||
| Tags | No tags attached. | ||||
| Attached Files | commit-05bf75e.diff (614 bytes)
commit 05bf75e4ea13500b877f5652f0b2a0d0d94c5adc
Author: 00christian00 <00christian00@users.noreply.github.com>
Date: Mon Mar 21 09:48:17 2016 +0100
Allow saving with the original name, without appending the .IT extension!
diff --git a/mptrack/Moddoc.cpp b/mptrack/Moddoc.cpp
index 4bac43a..3b79939 100644
--- a/mptrack/Moddoc.cpp
+++ b/mptrack/Moddoc.cpp
@@ -625,7 +625,7 @@ BOOL CModDoc::DoSave(const mpt::PathString &filename, BOOL)
saveFileName = dlg.GetFirstFile();
} else
{
- saveFileName = filename.ReplaceExt(ext);
+ saveFileName = filename;
}
// Do we need to create a backup file ?
| ||||
| Has the bug occurred in previous versions? | |||||
| Tested code revision (in case you know it) | |||||
|
There is actually a good reason for the current behaviour - Namely saving files that were imported from formats that OpenMPT cannot save. For example, assuming that you load sometune.j2b and hit Ctrl+S, it really should be resaved as sometune.it and not sometune.j2b. What kind of usage scenario do you envision for your patch? |
|
|
In my case I need to rename the modules as .bytes, as if I leave them as IT they are recognized as audio files by Unity3d and I can't parse them as binary with my library and unity internal module player is too limited and buggy. Maybe an option in the advanced settings then? |
|
|
Hm, I think to have the best of both worlds, I could take your patch and then set m_ShowSavedialog = true for all files that would need to be re-saved in a different format. |
|
|
Sounds good |
|
|
Behaviour was changed in r6178. |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-03-23 19:47 | chris82 | New Issue | |
| 2016-03-23 19:47 | chris82 | File Added: commit-05bf75e.diff | |
| 2016-03-23 19:52 | Saga Musix | Note Added: 0002297 | |
| 2016-03-23 20:02 | chris82 | Note Added: 0002299 | |
| 2016-03-23 20:05 | Saga Musix | Note Added: 0002300 | |
| 2016-03-23 20:18 | chris82 | Note Added: 0002304 | |
| 2016-03-23 20:44 | Saga Musix | Assigned To | => Saga Musix |
| 2016-03-23 20:44 | Saga Musix | Status | new => assigned |
| 2016-03-28 21:51 | Saga Musix | Note Added: 0002313 | |
| 2016-03-28 21:51 | Saga Musix | Status | assigned => resolved |
| 2016-03-28 21:51 | Saga Musix | Resolution | open => fixed |
| 2016-03-28 21:51 | Saga Musix | Fixed in Version | => OpenMPT 1.26.01.00 / libopenmpt 0.2-beta17 (upgrade first) |
| 2016-03-28 21:51 | Saga Musix | Target Version | => OpenMPT 1.26.01.00 / libopenmpt 0.2-beta17 (upgrade first) |