Code

move temporary canvas items to bottom by default. maybe fixes interfering of snapindi...
authorjohanengelen <johanengelen@users.sourceforge.net>
Tue, 1 Apr 2008 20:25:52 +0000 (20:25 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Tue, 1 Apr 2008 20:25:52 +0000 (20:25 +0000)
src/desktop.cpp
src/desktop.h

index a899e76c9904c4441c5fedc54e6c57ae49e94c5c..eee0446dbcbcad8288bcec2c709f66de49ea3f15 100644 (file)
@@ -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);
 }
 
index 4e2a12180a1a24701fa4fc42b1141a84847ab372..7653f0857bd38844c33b3b2a06230155bb6d5f73 100644 (file)
@@ -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);