From 30ddd4cde8df588f145fb5bd490d2077f39d258e Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Fri, 12 Dec 2014 13:45:29 +0100 Subject: Preferences. Fix for Bug #1401782 (Take from selection button should be greyed out at startup). Fixed bugs: - https://launchpad.net/bugs/1401782 (bzr r13797) --- src/ui/dialog/inkscape-preferences.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index ed4b16008..f00463a84 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -279,10 +279,14 @@ void InkscapePreferences::AddNewObjectsStyle(DialogPage &p, Glib::ustring const p.add_line( true, "", *hb, "", ""); // style swatch - Gtk::Button* button = Gtk::manage( new Gtk::Button(_("Take from selection"),true)); + Gtk::Button* button = Gtk::manage( new Gtk::Button(_("Take from selection"), true)); StyleSwatch *swatch = 0; Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + if (prefs->getInt(prefs_path + "/usecurrent")) { + button->set_sensitive(false); + } + SPCSSAttr *css = prefs->getStyle(prefs_path + "/style"); swatch = new StyleSwatch(css, _("This tool's style of new objects")); hb->add(*swatch); -- cgit v1.2.3