• Michael Natterer's avatar
    app: make sure name references to GimpData objects are serialized correctly · 9be16e00
    Michael Natterer authored
    They were also serialized correctly before, but only because many
    GimpData objects were (bogusly) always dirty after loading, which
    caused them to always be written do disk on exit. This commit fixes
    this problem and updates by-name references explicitly as things are
    renamed, instead of relying on bugs.
    Add gimp_data_factory_data_clean() which clears the dirty flags from
    all a factory's objects. Call the new function on all factories at the
    end of gimp_restore(), when all data has been loaded. This might be
    total overkill, but ensures that everything is clean in the beginning.
    Add new signal GimpContext::prop_name_changed() which is emitted when
    any of the context's object properties (brush, gradient etc) is
    In GimpToolPreset, connect to the new signal and dirty the preset if a
    relevant object propery was renamed, making sure the preset is saved
    to disk later. Also optmize updates quite a bit by ignoring
    notifications on tool option properties that are irrelevant to the
    This might or might not address the issues discussed in bug #739487.
gimpdatafactory.h 5.54 KB