~centralelyon2010/inkscape/imagelinks2

« back to all changes in this revision

Viewing changes to src/eraser-context.cpp

  • Committer: Ted Gould
  • Date: 2008-11-21 05:24:08 UTC
  • Revision ID: ted@canonical.com-20081121052408-tilucis2pjrrpzxx
MergeĀ fromĀ fe-moved

Show diffs side-by-side

added added

removed removed

Lines of Context:
742
742
            Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc());
743
743
 
744
744
            SPItem* acid = SP_ITEM(desktop->doc()->getObjectByRepr(dc->repr));
745
 
            boost::optional<Geom::Rect> eraserBbox = acid->getBounds(Geom::identity());
 
745
            Geom::OptRect eraserBbox = acid->getBounds(Geom::identity());
746
746
            Geom::Rect bounds = (*eraserBbox) * desktop->doc2dt();
747
747
            std::vector<SPItem*> remainingItems;
748
748
            GSList* toWorkOn = 0;
764
764
                    for (GSList *i = toWorkOn ; i ; i = i->next ) {
765
765
                        SPItem *item = SP_ITEM(i->data);
766
766
                        if ( eraserMode ) {
767
 
                            boost::optional<Geom::Rect> bbox = item->getBounds(Geom::identity());
 
767
                            Geom::OptRect bbox = item->getBounds(Geom::identity());
768
768
                            if (bbox && bbox->intersects(*eraserBbox)) {
769
769
                                Inkscape::XML::Node* dup = dc->repr->duplicate(xml_doc);
770
770
                                dc->repr->parent()->appendChild(dup);