Skip to content

Rework the management of paints by the Paint Servers dialog

Rafał Siejakowski requested to merge S-Rafael/inkscape:paints-crash into master

This MR redesigns the way in which the Paint Servers dialog loads and manages paints, fixing a crash reported in #3327 (closed).

The list of stock paints no longer duplicates when documents are switched under a floating Paint Servers dialog.

The list of all paints correctly updates whenever any of the constituent collections do.

Providing this fix required some infrastructure changes. The process of loading available paint servers from the current file and from the files in "share/paints" has been refactored and better documented. Crucially, de-duplication of paints is now global, rather than per source document, and the entries shown in the dialog are preferentially not those coming from the <defs>, unless they don't exist anywhere else.

Additionally, a memory leak is plugged.

Fixes #3327 (closed)

Edited by Rafał Siejakowski

Merge request reports