Are Linear Gradient's suppose to be automaticly deleted when the use count hits '0'?

Asked by rickmastfan67

The reason I'm asking is I was playing around with a file of mine which had separate gradients on each the stroke and fill. If I had selected one or the other, then clicked on gradient that was used on the other part of the item, Inkscape deleted instantly the one that was now no longer in use (since it's count hit 0) from both the selectable gradients and even the file. (I could hit Undo to get it back, but if I had saved the file and closed Inkscape thinking it was still in the file Defs, that could be considered data loss even though there is no crash.)

So, is this what Inkscape is suppose to do, or might this be a bug (and I'll file a proper bug report later today when a example file if it is a bug)?

Inkscape 0.91 r13725 x64 (MSI)
Windows 7 SP1 x64

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
su_v
Solved:
Last query:
Last reply:
Revision history for this message
su_v (suv-lp) said :
#2

> Are Linear Gradient's suppose to be automaticly deleted when the use
> count hits '0'?

Yes.

Revision history for this message
Best su_v (suv-lp) said :
#3

On 2015-05-17 19:44 (+0200), su_v wrote:
>> Are Linear Gradient's suppose to be automaticly deleted when the use
>> count hits '0'?
>
>
> Yes.

This is not different in 0.91 comapred to older versions btw, it's just
more visible because of the new gradient manager (list of used
gradients) in 'Fill and Stroke'. Unused gradients had been auto-purged
in older versions too (otherwise the <defs> section would be quickly
very bloated in more complex drawings which have a long editing history).

Revision history for this message
rickmastfan67 (rickmastfan67) said :
#4

Alright, just wanted to be sure about this. I'll just be more careful when working on gradients for my files not to accidentally cause Inkscape to eliminate then.

Revision history for this message
rickmastfan67 (rickmastfan67) said :
#5

Thanks ~suv, that solved my question.

Revision history for this message
su_v (suv-lp) said :
#6

See also
https://bugs.launchpad.net/inkscape/+bug/1064725

(bug status for that report has not been resolved for now, but the motivation to file it had been similar to your observation)