From b8dbb47f62e711209fa5deef2b4e0c867d591dd6 Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Wed, 26 Dec 2018 17:38:21 +0100 Subject: Allow InkFlowBox (XMLInspector) remember opendes status --- src/ui/widget/ink-flow-box.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ui/widget/ink-flow-box.cpp') diff --git a/src/ui/widget/ink-flow-box.cpp b/src/ui/widget/ink-flow-box.cpp index 394cf232c..127da3107 100644 --- a/src/ui/widget/ink-flow-box.cpp +++ b/src/ui/widget/ink-flow-box.cpp @@ -113,14 +113,14 @@ void InkFlowBox::on_global_toggle(Gtk::ToggleButton *tbutton) void InkFlowBox::insert(Gtk::Widget *widget, Glib::ustring label, gint pos, bool active, int minwidth) { + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); Gtk::ToggleButton *tbutton = new Gtk::ToggleButton(label, true); - tbutton->set_active(active); + tbutton->set_active(prefs->getBool(getPrefsPath(pos), active)); tbutton->signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &InkFlowBox::on_toggle), pos, tbutton)); _controller.pack_start(*tbutton); tbutton->show(); - Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - prefs->setBool(getPrefsPath(pos), active); + prefs->setBool(getPrefsPath(pos), prefs->getBool(getPrefsPath(pos), active)); widget->set_size_request(minwidth, -1); _flowbox.insert(*widget, pos); showing = 0; -- cgit v1.2.3