summaryrefslogtreecommitdiffstats
path: root/src/selection.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-11-03 23:42:23 +0000
committerJabiertxof <jtx@jtx.marker.es>2013-11-03 23:42:23 +0000
commit48ac54f0234671b23afeaad33af6168037ef552c (patch)
tree3a937530c745c958f8da1e788a8dfe94cff847d4 /src/selection.cpp
parentUpdate to trunk (diff)
parentRemove antiquated Perl extensions and modules, which were mostly useless. (diff)
downloadinkscape-48ac54f0234671b23afeaad33af6168037ef552c.tar.gz
inkscape-48ac54f0234671b23afeaad33af6168037ef552c.zip
Update to trunk
(bzr r12588.1.25)
Diffstat (limited to 'src/selection.cpp')
-rw-r--r--src/selection.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/selection.cpp b/src/selection.cpp
index aea5f539c..7c696daf0 100644
--- a/src/selection.cpp
+++ b/src/selection.cpp
@@ -237,8 +237,11 @@ void Selection::_remove(SPObject *obj) {
}
void Selection::setList(GSList const *list) {
- _clear();
- addList(list);
+ // Clear and add, or just clear with emit.
+ if (list != NULL) {
+ _clear();
+ addList(list);
+ } else clear();
}
void Selection::addList(GSList const *list) {
@@ -444,12 +447,7 @@ boost::optional<Geom::Point> Selection::center() const {
return first->getCenter();
}
}
- Geom::OptRect bbox;
- if (Inkscape::Preferences::get()->getInt("/tools/bounding_box") == 0) {
- bbox = visualBounds();
- } else{
- bbox = geometricBounds();
- }
+ Geom::OptRect bbox = preferredBounds();
if (bbox) {
return bbox->midpoint();
} else {