summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d6bcf9b)
raw | patch | inline | side by side (parent: d6bcf9b)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Tue, 1 Apr 2008 20:25:52 +0000 (20:25 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Tue, 1 Apr 2008 20:25:52 +0000 (20:25 +0000) |
src/desktop.cpp | patch | blob | history | |
src/desktop.h | patch | blob | history |
diff --git a/src/desktop.cpp b/src/desktop.cpp
index a899e76c9904c4441c5fedc54e6c57ae49e94c5c..eee0446dbcbcad8288bcec2c709f66de49ea3f15 100644 (file)
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
/** 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 4e2a12180a1a24701fa4fc42b1141a84847ab372..7653f0857bd38844c33b3b2a06230155bb6d5f73 100644 (file)
--- a/src/desktop.h
+++ b/src/desktop.h
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);