Export selection - won't remember last used file name

Bug #1153829 reported by pRototype
50
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Medium
Unassigned

Bug Description

This affects "Inkscape 0.48+devel r12162" but not the latest stable version.

I have a drawing, any kind of drawing, and I want to export just a part of it to png.
Therefore I draw up a rectangle, wich I then select and do a File --> Export.
I select the tab named "Selection", enters a file name and then hit the Export button, and close the export dialog box.

Then I do some changes on the drawing, and I use the same rectangle to export a section of the drawing. SO I follows the same procedure as for previous export to png I did.

Now, I expect that Inkscape remember the last file name (full path to png file), but instead Inkscape propose to use the rectangle's ID.

Like said, this doesn't affect the stable version. The stable version will put some sort of tag on the rectangle so that it remembers what file name was used last time.

jazzynico (jazzynico)
tags: added: bitmap exporting preferences ui
Revision history for this message
jazzynico (jazzynico) wrote :

Confirmed on Windows XP, Inkscape trunk revision 12224.

<Slightly off-topic>
Note that in 0.48.4 the path is stored in the document (inkscape:export-filename attribute) with an absolute path, which is not a very good idea. See the following reports:
* Bug #168504 "export-filename must store relative path with / slashes"
* Bug #168958 'Privacy concern with export-filename and sodipodi:absref"
</Slightly off-topic>

Changed in inkscape:
importance: Undecided → Low
status: New → Confirmed
tags: added: regression
Revision history for this message
jazzynico (jazzynico) wrote :

Marking the report as a confirmed regression, but I'm not sure if it is a true regression, or a security improvement...

Revision history for this message
su_v (suv-lp) wrote :

Based on tests with archived builds on OS X 10.7.5:
- not reproduced with rev <= 11231
- reproduced with rev >= 11243
which - just based on the changelog - doesn't seem to have been intentional (at least no mention of security concerns there)?
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/changes/11243>

Candidate revisions could be:
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/11236>
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/11237>
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/11238>

Changed in inkscape:
status: Confirmed → Triaged
Revision history for this message
su_v (suv-lp) wrote :

If the change was not intentional (i.e. not removed due to security concerns, with a proposal how to still support batch export to custom locations and files) I propose to raise importance to medium.

Revision history for this message
su_v (suv-lp) wrote :

Possibly my earlier test was bogus - can't reproduce the same results with the same tested reivsions again (using new prefs, an existing file, as before, and monitoring the attributes added on export to the selected object via XML Editor).

Revision history for this message
su_v (suv-lp) wrote :

Attaching a test case which so far reproduces consistently with current trunk (r13156):

Steps to reproduce:
1) launch trunk (default new prefs)
2) open attached file
3) select group
4) 'Shift+Ctrl+E' to open export dialog
5) highlight 'g3270' and overwrite it with e.g. 'test1'
6) press <enter> to export
7) deselect and reselect group: the export name reverts to 'g3270' (/path/to/svg_file/g3270.png)
--> export-filename is not stored with the object

Jazzynico's comments (on irc):
> But if you try again and save to d:\test1.png, it works.
> And saving again to the original path fails.

su_v (suv-lp)
Changed in inkscape:
milestone: none → 0.47
Revision history for this message
su_v (suv-lp) wrote :

Variation (possibly duplicate):
* Bug #1422131 “The export tool not remember the export path/filename”
  https://bugs.launchpad.net/inkscape/+bug/1422131

Changed in inkscape:
milestone: 0.47 → 0.92
Revision history for this message
su_v (suv-lp) wrote :

AFAICT - at least on OS X - this only affects exports to the same location (directory aka folder) as the SVG file itself, with a custom file name for the exported PNG image (different than the object ID): neither export path nor the custom file name is stored as 'inkscape:export-filename' for the exported object as expected (and as in 0.48.x).

OTOH the information is correctly recorded for the exported object when exporting to a different folder (with absolute or relative path to the current location of the SVG file itself, does not matter).

In today's tests with archived builds on OS X 10.7.5:
- not reproduced with rev <= 11243,
- reproduced with rev >= 11250;
the regression seems related to changes between r11243 (behaves like 0.48.x) and r11250 (custom export file name is not stored if exported to the same folder as SVG file):
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/changes/11250

ISTM the changed behavior most likely is a side-effect of the refactoring in rev 11245
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/11245

Revision history for this message
su_v (suv-lp) wrote :

Raising bug importance to 'Medium' - this regression can break workflows which depend on correctly named exports (e.g. for batch exporting, or scripted exports via command line relying on correctly stored export hints).

Changed in inkscape:
importance: Low → Medium
tags: removed: preferences
Revision history for this message
ricardoasensio (ricardoasensio) wrote :

This bug seems to be the same as https://bugs.launchpad.net/inkscape/+bug/1422131

In ubuntu 14.04 / inkscape 0.91

I confirm that ....

a) objects which had not been exported before (no export hints stored at all),as well as
b) objects which already have an export-filename stored (which does not get updated as expected with 0.91)

Revision history for this message
Damian Thater (a-uiuntu-n) wrote :

Using: Windows 8 & 8.1 & 10 / Inkscape 0.91

1. Create an new document, draw an rect, select it, export as png image.
2. Set absolute filename.
3. Export selected rect as png image.
4. Save inscape svg file.
5. Open svg file in text editor.
6. Check for attributes "inkscape:export-filename", "inkscape:export-xdpi" and "inkscape:export-ydpi"
6a. "inkscape:export-xdpi" and "inkscape:export-ydpi" are set, while "inkscape:export-filename" is missing.

1. Open previously created document, select the rect, export as png image.
2. Set absolute filename.
3. Change dpi to 199.
4. Save inscape svg file.
5. Open svg file in text editor.
6. Check for attributes "inkscape:export-filename", "inkscape:export-xdpi" and "inkscape:export-ydpi"
6a. "inkscape:export-xdpi" and "inkscape:export-ydpi" are set with previous value, but not 199, while "inkscape:export-filename" is still missing.

1. Open previously created document, select the rect, export as png image.
2. Set absolute filename.
3. Change dpi to 299.
4. Export selected rect as png image.
5. Save inscape svg file.
6. Open svg file in text editor.
7. Check for attributes "inkscape:export-filename", "inkscape:export-xdpi" and "inkscape:export-ydpi"
7a. "inkscape:export-xdpi" and "inkscape:export-ydpi" are set with expected value, which correctly is 299, "inkscape:export-filename" is still missing.

1. Open previously created svg file in text editor.
2. Enhance rect-tag with attribute: inkscape:export-filename="/abc/test"
3. Save text file.
4. Open svg document with Inkscape, select the rect, export as png image.
5. Check for filename in export editor
5a. Filename was read correctly.

Revision history for this message
Olof Bjarnason (objarni) wrote :

Reproduced on Win7 Inkscape 0.91 using an *unsaved* source document.

Workaround: Saving the source document. Works for both putting the svg beside the .png's, and somewhere else.

Revision history for this message
Olof Bjarnason (objarni) wrote :

Is this because the batch export feature uses command line / scripted Inkscape? If that is the case, from a user standpoint I suggest the batch export checkbox be grayed-out possibly with a tooltip explaining why it is grayed out ("Batch export is only available for saved documents" or similar).

Revision history for this message
Olof Bjarnason (objarni) wrote :

Update: the "remember export path" functionality does *not* work if the source document i saved in same folder as exported png. So there's actually two issues here:

1) export does not work if the svg document isn't saved
2) if export is attempted from a rectangle to a png placed "beside" the svg, the path is not remembered.

Workaround for (1) is to save document anywhere.
Workaround for (2) is to export png's to some other place than the .svg.

Revision history for this message
Peter Freeth (peterfreeth) wrote :

I propose that this is a high priority bug because when developing graphics for clients e.g. logos, web graphics, I might go through many iterations of a PNG file and having to manually go through the whole file system to get to the saved PNG introduces a huge potential for mistakes.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.