diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-11-01 10:24:43 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-11-01 10:24:43 +0000 |
| commit | 08da3fe7cf2b70b8ff16075c5cbf2657e93267bb (patch) | |
| tree | 5c9665f5bc9a6bf825bcf60509a4fd37fad4e8cf /src | |
| parent | Add widget to color and some refactoring (diff) | |
| parent | fix removing class when object to path (diff) | |
| download | inkscape-08da3fe7cf2b70b8ff16075c5cbf2657e93267bb.tar.gz inkscape-08da3fe7cf2b70b8ff16075c5cbf2657e93267bb.zip | |
Merge branch 'master' into menuInverseClipMask
Diffstat (limited to 'src')
| -rw-r--r-- | src/path-chemistry.cpp | 4 | ||||
| -rw-r--r-- | src/svg/svg-color.cpp | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index b3b0c8076..b824d15c7 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -430,6 +430,8 @@ sp_item_list_to_curves(const std::vector<SPItem*> &items, std::vector<SPItem*>& Inkscape::XML::Node *parent = item->getRepr()->parent(); // remember id char const *id = item->getRepr()->attribute("id"); + // remember class + char const *class_attr = item->getRepr()->attribute("class"); // remember title gchar *title = item->title(); // remember description @@ -444,6 +446,8 @@ sp_item_list_to_curves(const std::vector<SPItem*> &items, std::vector<SPItem*>& // restore id repr->setAttribute("id", id); + // restore class + repr->setAttribute("class", class_attr); // add the new repr to the parent parent->appendChild(repr); SPObject* newObj = document->getObjectByRepr(repr); diff --git a/src/svg/svg-color.cpp b/src/svg/svg-color.cpp index 89a5636a8..60cbff3dc 100644 --- a/src/svg/svg-color.cpp +++ b/src/svg/svg-color.cpp @@ -398,7 +398,7 @@ guint32 sp_svg_read_color(gchar const *str, gchar const **end_ptr, guint32 dfl) * this check wrapper. */ gchar const *end = str; guint32 const ret = internal_sp_svg_read_color(str, &end, dfl); - assert(((ret == dfl) && (end == str)) + g_assert(((ret == dfl) && (end == str)) || (((ret & 0xff) == 0) && (str < end))); if (str < end) { @@ -407,7 +407,7 @@ guint32 sp_svg_read_color(gchar const *str, gchar const **end_ptr, guint32 dfl) buf[end - str] = '\0'; gchar const *buf_end = buf; guint32 const check = internal_sp_svg_read_color(buf, &buf_end, 1); - assert(check == ret + g_assert(check == ret && buf_end - buf == end - str); g_free(buf); @@ -425,7 +425,7 @@ guint32 sp_svg_read_color(gchar const *str, gchar const **end_ptr, guint32 dfl) */ static void rgb24_to_css(char *const buf, unsigned const rgb24) { - assert(rgb24 < (1u << 24)); + g_assert(rgb24 < (1u << 24)); /* SVG 1.1 Full allows additional colour names not supported by SVG Tiny, but we don't bother * with them: it's good for these colours to be copyable to non-SVG CSS stylesheets and for |
