diff options
| author | Jabiertxof <jabier.arraiza@marker.es> | 2019-09-20 10:06:36 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2019-09-29 22:44:33 +0000 |
| commit | 4a5af5e7118e0a5f657fb8a9060373d1c003a0fd (patch) | |
| tree | 5e26972daa1410d9281081918733c556f6859ce4 /src/ui/tools | |
| parent | fix a hard to reproduce crash on textool when the CSS comapared is nullptr (diff) | |
| download | inkscape-4a5af5e7118e0a5f657fb8a9060373d1c003a0fd.tar.gz inkscape-4a5af5e7118e0a5f657fb8a9060373d1c003a0fd.zip | |
Fixes pointed by Thomas
Diffstat (limited to 'src/ui/tools')
| -rw-r--r-- | src/ui/tools/text-tool.cpp | 8 | ||||
| -rw-r--r-- | src/ui/tools/text-tool.h | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/ui/tools/text-tool.cpp b/src/ui/tools/text-tool.cpp index bba60dd95..24fdaee62 100644 --- a/src/ui/tools/text-tool.cpp +++ b/src/ui/tools/text-tool.cpp @@ -1422,8 +1422,13 @@ SPCSSAttr *sp_text_get_style_at_cursor(ToolBase const *ec) return nullptr; } +// this two functions are commented because are used on clipboard +// and because slow the text pastinbg and usage a lot +// and couldent get it working properly we miss font size font style or never work +// and user usualy want paste as plain text and get the position context +// style. Anyway I retain for further usage. -static bool css_attrs_are_equal(SPCSSAttr const *first, SPCSSAttr const *second) +/* static bool css_attrs_are_equal(SPCSSAttr const *first, SPCSSAttr const *second) { if (!first && !second) { return true; @@ -1481,6 +1486,7 @@ std::vector<SPCSSAttr*> sp_text_get_selected_style(ToolBase const *ec, unsigned positions->push_back(*k); return vec; } + */ /** Deletes the currently selected characters. Returns false if there is no diff --git a/src/ui/tools/text-tool.h b/src/ui/tools/text-tool.h index 666a42dd2..6f49b3343 100644 --- a/src/ui/tools/text-tool.h +++ b/src/ui/tools/text-tool.h @@ -94,7 +94,7 @@ private: bool sp_text_paste_inline(ToolBase *ec); Glib::ustring sp_text_get_selected_text(ToolBase const *ec); SPCSSAttr *sp_text_get_style_at_cursor(ToolBase const *ec); -std::vector<SPCSSAttr*> sp_text_get_selected_style(ToolBase const *ec, unsigned *k, int *b, std::vector<unsigned> *positions); +// std::vector<SPCSSAttr*> sp_text_get_selected_style(ToolBase const *ec, unsigned *k, int *b, std::vector<unsigned> *positions); bool sp_text_delete_selection(ToolBase *ec); void sp_text_context_place_cursor (TextTool *tc, SPObject *text, Inkscape::Text::Layout::iterator where); void sp_text_context_place_cursor_at (TextTool *tc, SPObject *text, Geom::Point const p); |
