Modifying a swatch's color through color sliders spams the undo history

Summary:

Modifying a swatch's color through color sliders spams the undo history.

Steps to reproduce:

  • Create an object.
  • Change the fill/stroke mode to "Swatch".
  • Drag any color slider.
  • Try to undo.

What happened?

Undoing goes through every step of the drag.

What should have happened?

Undoing should undo to the color when the drag started, like when dragging in any other mode.

Version info

Inkscape 1.4 (e7c3feb100, 2024-10-09)

                  Compile  (Run)
GLib version:     2.82.4
GTK version:      3.24.43 (3.24.48)
glibmm version:   2.66.7
gtkmm version:    3.24.9
libxml2 version:  2.13.5
libxslt version:  1.1.42
Cairo version:    1.18.2 (1.18.2)
Pango version:    1.54.0 (1.56.1)
HarfBuzz version: 10.1.0 (10.2.0)

OS version:       Arch Linux