diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2009-02-20 21:49:07 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2009-02-20 21:49:07 +0000 |
| commit | 7860d701fd23d8e5f03086c249d30759732f07fd (patch) | |
| tree | c3b8f351366407783eb5c96ba4fcdbbc7a132da9 /src/sp-text.cpp | |
| parent | Some filters and extensions updates (diff) | |
| download | inkscape-7860d701fd23d8e5f03086c249d30759732f07fd.tar.gz inkscape-7860d701fd23d8e5f03086c249d30759732f07fd.zip | |
The snap indicator's tooltip now displays "A to B", whereas before it only displayed "B".
(bzr r7335)
Diffstat (limited to 'src/sp-text.cpp')
| -rw-r--r-- | src/sp-text.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sp-text.cpp b/src/sp-text.cpp index 8627e179f..abfb9ca65 100644 --- a/src/sp-text.cpp +++ b/src/sp-text.cpp @@ -74,7 +74,7 @@ static void sp_text_bbox(SPItem const *item, NRRect *bbox, Geom::Matrix const &t static NRArenaItem *sp_text_show (SPItem *item, NRArena *arena, unsigned key, unsigned flags); static void sp_text_hide (SPItem *item, unsigned key); static char *sp_text_description (SPItem *item); -static void sp_text_snappoints(SPItem const *item, SnapPointsIter p, Inkscape::SnapPreferences const *snapprefs); +static void sp_text_snappoints(SPItem const *item, bool const target, SnapPointsWithType &p, Inkscape::SnapPreferences const *snapprefs); static Geom::Matrix sp_text_set_transform(SPItem *item, Geom::Matrix const &xform); static void sp_text_print (SPItem *item, SPPrintContext *gpc); @@ -428,12 +428,13 @@ sp_text_description(SPItem *item) return ret; } -static void sp_text_snappoints(SPItem const *item, SnapPointsIter p, Inkscape::SnapPreferences const */*snapprefs*/) +static void sp_text_snappoints(SPItem const *item, bool const target, SnapPointsWithType &p, Inkscape::SnapPreferences const */*snapprefs*/) { // the baseline anchor of the first char Inkscape::Text::Layout const *layout = te_get_layout((SPItem *) item); if(layout != NULL) { - *p = layout->characterAnchorPoint(layout->begin()) * sp_item_i2d_affine(item); + int type = target ? int(Inkscape::SNAPTARGET_HANDLE) : int(Inkscape::SNAPSOURCE_HANDLE); + p.push_back(std::make_pair(layout->characterAnchorPoint(layout->begin()) * sp_item_i2d_affine(item), type)); } } |
