summaryrefslogtreecommitdiffstats
path: root/src/selection.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-11-03 23:32:42 +0000
committerJabiertxof <jtx@jtx.marker.es>2013-11-03 23:32:42 +0000
commita6f1259a7e81b912e0335f1ad45d60a1cf534f4b (patch)
tree422c413ef09f52222938fe281fadea2d78fd71f3 /src/selection.cpp
parentUpdate to trunk (diff)
parentRemove antiquated Perl extensions and modules, which were mostly useless. (diff)
downloadinkscape-a6f1259a7e81b912e0335f1ad45d60a1cf534f4b.tar.gz
inkscape-a6f1259a7e81b912e0335f1ad45d60a1cf534f4b.zip
Update to trunk
(bzr r11950.1.192)
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 {