Unexpected multiple save actions behaviour
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Phatch |
Fix Released
|
Medium
|
Stani |
Bug Description
If you add multiple save actions the resulting behaviour is unexpected.
Let's say I'm executing the following actionlist:
{'actions': [
'description': u'Describe here the action list.'}
The resulting images will be written to:
<folder>_phatch1/
<folder>
<folder>
If you remove <subfolder> from paths the resulting images will be written to:
<folder>_phatch1/
<folder>_phatch2/
<folder>_phatch3/
After some debugging I think I know the cause of this behaviour. <subfolder> is calculated like this:
info[_t(
But when an image is saved, its location info (or dirname) changes to the new save location. After the first save the dirname becomes <folder>_phatch1/ and as a result subfolder will be phatch1
Changed in phatch: | |
importance: | Low → Medium |
summary: |
- unexpected multiple save actions behaviour + Unexpected multiple save actions behaviour |
Changed in phatch: | |
milestone: | none → 0.2.1 |
status: | Fix Committed → Fix Released |
Good point!
Actually this is a design decision what to do with variables (such as width, height, folder, type, ...) during multiple saves. I've been thinking already about this during Phatch 0.1
I thought of three strategies:
1) keep old, prefix new
- keep the variables of the original source file with the original names
- add the variables with the prefix "new." to the newly saved files
2) prefix old, keep new
- store the variables of the original source file with the prefix "source.", "base." or "old."
- keep the variables of the original source file with the original names
3) index variables with suffix
- original variables gets suffix ".0"
- second saved file gets suffix ".1"
(of course variables without suffix are still valid and than we should decide if it is the latest or the first file)
Maybe my preference is 3, but I am curious to hear your opinions.
What do you expect when in one action list you save 3 times with different sizes in percentages (like for icons)? I think it needs to be of the last save otherwise features like text offset with % will be broken.
I'll post this issue to discuss it on our mailing list (Some patience, I'm just waiting for Robin to register).