From: johanengelen Date: Tue, 1 Apr 2008 20:25:52 +0000 (+0000) Subject: move temporary canvas items to bottom by default. maybe fixes interfering of snapindi... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9f438527cbe39f09e230f728d6bf5b5e045871d3;p=inkscape.git move temporary canvas items to bottom by default. maybe fixes interfering of snapindicator with pen tool --- diff --git a/src/desktop.cpp b/src/desktop.cpp index a899e76c9..eee0446db 100644 --- a/src/desktop.cpp +++ b/src/desktop.cpp @@ -397,10 +397,15 @@ SPDesktop::~SPDesktop() {} /** Note that lifetime is measured in milliseconds * it is perfectly safe to ignore the returned pointer: the object is deleted by itself, so don't delete it elsewhere! * The return value should only be used as argument for SPDesktop::remove_temporary_canvasitem, because the object might be deleted already. +* move_to_bottom = true by default so the item does not interfere with handling of other items on the canvas like nodes. */ Inkscape::Display::TemporaryItem * -SPDesktop::add_temporary_canvasitem (SPCanvasItem *item, guint lifetime) +SPDesktop::add_temporary_canvasitem (SPCanvasItem *item, guint lifetime, bool move_to_bottom) { + if (move_to_bottom) { + sp_canvas_item_move_to_z(item, 0); + } + return temporary_item_list->add_item(item, lifetime); } diff --git a/src/desktop.h b/src/desktop.h index 4e2a12180..7653f0857 100644 --- a/src/desktop.h +++ b/src/desktop.h @@ -184,7 +184,7 @@ struct SPDesktop : public Inkscape::UI::View::View return _guides_message_context; } - Inkscape::Display::TemporaryItem * add_temporary_canvasitem (SPCanvasItem *item, guint lifetime); + Inkscape::Display::TemporaryItem * add_temporary_canvasitem (SPCanvasItem *item, guint lifetime, bool move_to_bottom = true); void remove_temporary_canvasitem (Inkscape::Display::TemporaryItem * tempitem); void _setDisplayMode(Inkscape::RenderMode mode);