Code

now that selection description includes style (filtered, clipped), we need to update...
[inkscape.git] / src / layer-manager.cpp
index c7ba0e9045f93778b15cf6b6b7d6ce5966e5762f..3e49edac5723299ab5699850b14ab31fe6c478c1 100644 (file)
@@ -16,7 +16,7 @@
 #include "desktop.h"
 #include "desktop-handles.h"
 #include "layer-manager.h"
-#include "prefs-utils.h"
+#include "preferences.h"
 #include "ui/view/view.h"
 #include "selection.h"
 #include "sp-object.h"
@@ -150,7 +150,8 @@ void LayerManager::setCurrentLayer( SPObject* obj )
     if ( _desktop->currentRoot() ) {
         _desktop->setCurrentLayer( obj );
 
-        if ( prefs_get_int_attribute_limited("options.selection", "layerdeselect", 1, 0, 1) ) {
+        Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+        if (prefs->getBool("/options/selection/layerdeselect", true)) {
             sp_desktop_selection( _desktop )->clear();
         }
     }