The bug is related to the way signals are emitted. Inkscape should first initialize the pages and set the selection to the saved (in the preferences.xml file) value, and then call the on_changed signal on the TreeSelection when the selection is changed.
It works as expected when docked (now disabled), but with a floating dialog the signal_changed is called first.
According to the gtkmm documentation (https://developer.gnome.org/gtkmm/stable/classGtk_1_1TreeSelection.html#ad880fbe3cf130fe7c46f410b7efe3c0f):
"Emitted whenever the selection has (possibly) changed. Please note that this signal is mostly a hint. It may only be emitted once when a range of rows are selected, and it may occasionally be emitted when nothing has happened. "
Patch attached, please test!
The bug is related to the way signals are emitted. Inkscape should first initialize the pages and set the selection to the saved (in the preferences.xml file) value, and then call the on_changed signal on the TreeSelection when the selection is changed.
It works as expected when docked (now disabled), but with a floating dialog the signal_changed is called first. /developer. gnome.org/ gtkmm/stable/ classGtk_ 1_1TreeSelectio n.html# ad880fbe3cf130f e7c46f410b7efe3 c0f):
According to the gtkmm documentation (https:/
"Emitted whenever the selection has (possibly) changed. Please note that this signal is mostly a hint. It may only be emitted once when a range of rows are selected, and it may occasionally be emitted when nothing has happened. "