From: buliabyak Date: Tue, 16 Oct 2007 05:07:46 +0000 (+0000) Subject: associate an item with the line, for grdrag X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=44207fb02ca1dbaa5a25e9ec7db2c9368f9f0606;p=inkscape.git associate an item with the line, for grdrag --- diff --git a/src/display/sp-ctrlline.cpp b/src/display/sp-ctrlline.cpp index 85f8fdc60..e94805831 100644 --- a/src/display/sp-ctrlline.cpp +++ b/src/display/sp-ctrlline.cpp @@ -78,6 +78,7 @@ sp_ctrlline_init (SPCtrlLine *ctrlline) ctrlline->rgba = 0x0000ff7f; ctrlline->s.x = ctrlline->s.y = ctrlline->e.x = ctrlline->e.y = 0.0; ctrlline->shp=NULL; + ctrlline->item=NULL; } static void @@ -93,6 +94,8 @@ sp_ctrlline_destroy (GtkObject *object) ctrlline->shp = NULL; } + ctrlline->item=NULL; + if (GTK_OBJECT_CLASS (parent_class)->destroy) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } diff --git a/src/display/sp-ctrlline.h b/src/display/sp-ctrlline.h index d466e16cf..d7863bf19 100644 --- a/src/display/sp-ctrlline.h +++ b/src/display/sp-ctrlline.h @@ -18,12 +18,14 @@ #include +struct SPItem; #define SP_TYPE_CTRLLINE (sp_ctrlline_get_type ()) #define SP_CTRLLINE(obj) (GTK_CHECK_CAST ((obj), SP_TYPE_CTRLLINE, SPCtrlLine)) #define SP_IS_CTRLLINE(obj) (GTK_CHECK_TYPE ((obj), SP_TYPE_CTRLLINE)) struct SPCtrlLine : public SPCanvasItem{ + SPItem *item; // the item to which this line belongs in some sense; may be NULL for some users guint32 rgba; NRPoint s, e; Shape* shp;