title and descriptions disappear under various operations

Bug #238113 reported by sas
6
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Unassigned

Bug Description

Some operations that modify an object lose any title or description that the object may have had.

An example:

  1) Draw a rectangle (with the rectangle tool).
  2) Give the rectangle a title (right click on the rectangle, select Object Properties, type in a title, click Set, and then close the dialog).
  3) Convert the rectangle to a path (Path -> Object to Path).
  4) Notice that the converted rectangle has no title (right click on it, and select Object Properties).

Expected behaviour: metadata ought to be preserved whenever it's reasonable to do so.

This problem has always existed, but it's more serious now that there's a UI for adding titles and descriptions, as users won't appreciate having titles and descriptions that they've added thrown away without good reason.

Operations that have this problem include the following:

   path simplify
   object-to-path
   stroke-to-path
   convert-to-text
   unflow
   flow into frame
   difference (maybe)
   ungrouping a group of one item (any title/description should be passed down to the child item, unless the child item already has its own)
   import (any top-level title/description of the image to be imported should become the title/description for the new object that represents the imported image)

Tags: metadata
Revision history for this message
sas (sas-sas) wrote :

Assigning to myself, as I'm intending to do some more work on titles and descriptions, which will probably include some of the above.

Changed in inkscape:
assignee: nobody → sas-sas
sas (sas-sas)
description: updated
Revision history for this message
codedread (codedread) wrote :

I'm not familiar with all the actions here.

I think the only one that seems 'mandatory' to me is the "path simplify" one. If someone converts an object/stroke to a path, it makes sense to preserve title/desc of the converted object but it's not the end of the world if it doesn't.

Revision history for this message
Rob Russell (rob-latenightpc) wrote :

Here's a little patch to keep title and description after doing object-to-path.

Revision history for this message
Rob Russell (rob-latenightpc) wrote :

Here's a better patch than my earlier one (use this one instead of that one). It handles path simplify, object-to-path, stroke-to-path and difference. I didn't approach the ungroup case because I don't know that it's desirable to apply the title of a group to the single item in it. Handling the root level title is addressed in bug 254857. The affected files are path-chemistry.cpp and splivarot.cpp.

Revision history for this message
Rob Russell (rob-latenightpc) wrote :

Okay, this time I'm really done. I had neglected to call g_free() in my earlier patch.

Revision history for this message
codedread (codedread) wrote :

Can't g_free() a const pointer apparently when compiling in Linux. Uploading an updated patch.

Revision history for this message
codedread (codedread) wrote :

Committed patch to trunk

Changed in inkscape:
assignee: sas-sas → nobody
status: New → Confirmed
status: Confirmed → Fix Committed
jazzynico (jazzynico)
tags: added: metadata
Changed in inkscape:
status: Fix Committed → Fix Released
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.