summaryrefslogtreecommitdiffstats
path: root/src/selcue.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-07-24 23:26:11 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-07-24 23:26:11 +0000
commit7b6ffd82650ee1e20a53b0631d5c2dddef58e8d5 (patch)
tree48cae26bf789b11d79f72efc16a6676f960eaaa6 /src/selcue.cpp
parentupdate to trunk (diff)
parent3D box tool: the shift key must not prevent snapping of the vanishing point. ... (diff)
downloadinkscape-7b6ffd82650ee1e20a53b0631d5c2dddef58e8d5.tar.gz
inkscape-7b6ffd82650ee1e20a53b0631d5c2dddef58e8d5.zip
update to trunk
(bzr r12588.1.45)
Diffstat (limited to 'src/selcue.cpp')
-rw-r--r--src/selcue.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/selcue.cpp b/src/selcue.cpp
index d2fa0970a..c73219b7d 100644
--- a/src/selcue.cpp
+++ b/src/selcue.cpp
@@ -96,15 +96,16 @@ void Inkscape::SelCue::_updateItemBboxes(Inkscape::Preferences *prefs)
void Inkscape::SelCue::_updateItemBboxes(gint mode, int prefs_bbox)
{
- GSList const *items = _selection->itemList();
- if (_item_bboxes.size() != g_slist_length((GSList *) items)) {
+ const std::vector<SPItem*> items = _selection->itemList();
+ if (_item_bboxes.size() != items.size()) {
_newItemBboxes();
return;
}
int bcount = 0;
- for (GSList const *l = _selection->itemList(); l != NULL; l = l->next) {
- SPItem *item = static_cast<SPItem *>(l->data);
+ std::vector<SPItem*> ll=_selection->itemList();
+ for (std::vector<SPItem*>::const_iterator l = ll.begin(); l != ll.end(); l++) {
+ SPItem *item = *l;
SPCanvasItem* box = _item_bboxes[bcount ++];
if (box) {
@@ -145,8 +146,9 @@ void Inkscape::SelCue::_newItemBboxes()
int prefs_bbox = prefs->getBool("/tools/bounding_box");
- for (GSList const *l = _selection->itemList(); l != NULL; l = l->next) {
- SPItem *item = static_cast<SPItem *>(l->data);
+ std::vector<SPItem*> ll=_selection->itemList();
+ for (std::vector<SPItem*>::const_iterator l = ll.begin(); l != ll.end(); l++) {
+ SPItem *item = *l;
Geom::OptRect const b = (prefs_bbox == 0) ?
item->desktopVisualBounds() : item->desktopGeometricBounds();
@@ -199,8 +201,9 @@ void Inkscape::SelCue::_newTextBaselines()
}
_text_baselines.clear();
- for (GSList const *l = _selection->itemList(); l != NULL; l = l->next) {
- SPItem *item = static_cast<SPItem *>(l->data);
+ std::vector<SPItem*> ll = _selection->itemList();
+ for (std::vector<SPItem*>::const_iterator l=ll.begin();l!=ll.end();l++) {
+ SPItem *item = *l;
SPCanvasItem* baseline_point = NULL;
if (SP_IS_TEXT(item) || SP_IS_FLOWTEXT(item)) { // visualize baseline