From 20452bbd40fe1d93b2093cb5dea8e4cb8ae967d3 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Thu, 24 Apr 2014 14:53:30 +0200 Subject: Clean up of style code: refactor marker properties. Step 3. (bzr r13301) --- src/widgets/stroke-style.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/widgets/stroke-style.cpp') diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp index a4cca9472..0e0a4fd72 100644 --- a/src/widgets/stroke-style.cpp +++ b/src/widgets/stroke-style.cpp @@ -581,7 +581,8 @@ StrokeStyle::forkMarker(SPObject *marker, int loc, SPItem *item) Glib::ustring urlId = Glib::ustring::format("url(#", marker->getRepr()->attribute("id"), ")"); unsigned int refs = 0; for (int i = SP_MARKER_LOC_START; i < SP_MARKER_LOC_QTY; i++) { - if (item->style->marker[i].set && !strcmp(urlId.c_str(), item->style->marker[i].value)) { + if (item->style->marker_ptrs[i]->set && + !strcmp(urlId.c_str(), item->style->marker_ptrs[i]->value)) { refs++; } } @@ -1176,11 +1177,11 @@ StrokeStyle::updateAllMarkers(GSList const *objects) combo->setDesktop(desktop); - if (object->style->marker[keyloc[i].loc].value != NULL && !all_texts) { + if (object->style->marker_ptrs[keyloc[i].loc]->value != NULL && !all_texts) { // If the object has this type of markers, // Extract the name of the marker that the object uses - SPObject *marker = getMarkerObj(object->style->marker[keyloc[i].loc].value, object->document); + SPObject *marker = getMarkerObj(object->style->marker_ptrs[keyloc[i].loc]->value, object->document); // Scroll the combobox to that marker combo->set_current(marker); -- cgit v1.2.3 From 395b34493e806b4aa2333c694d7d6e4e4d4700a4 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Tue, 2 Sep 2014 17:14:55 -0400 Subject: Remove misleading dialogs directory (bzr r13341.1.192) --- src/widgets/stroke-style.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/stroke-style.cpp') diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp index 0e0a4fd72..3fa39da6f 100644 --- a/src/widgets/stroke-style.cpp +++ b/src/widgets/stroke-style.cpp @@ -18,7 +18,7 @@ #define noSP_SS_VERBOSE #include "stroke-style.h" -#include "../gradient-chemistry.h" +#include "gradient-chemistry.h" #include "sp-gradient.h" #include "sp-stop.h" #include "svg/svg-color.h" -- cgit v1.2.3 From 25f2a039c44b34fce5f0f4eb84259c4c1755aa62 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 13 Oct 2014 10:50:39 +0200 Subject: Fix multiple: "Called C++ object pointer is null" (bzr r13608) --- src/widgets/stroke-style.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/widgets/stroke-style.cpp') diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp index 0e0a4fd72..9c8d45908 100644 --- a/src/widgets/stroke-style.cpp +++ b/src/widgets/stroke-style.cpp @@ -763,6 +763,9 @@ StrokeStyle::setJoinType (unsigned const jointype) tb = joinBevel; break; default: + // Should not happen + std::cerr << "StrokeStyle::setJoinType(): Invalid value" << std::endl; + tb = joinMiter; break; } setJoinButtons(tb); @@ -786,6 +789,9 @@ StrokeStyle::setCapType (unsigned const captype) tb = capSquare; break; default: + // Should not happen + std::cerr << "StrokeStyle::setCapType(): Invalid value" << std::endl; + tb = capButt; break; } setCapButtons(tb); -- cgit v1.2.3 From 56d3d2d17953c3340f2af4d9504f2ce6cd65e917 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sun, 19 Oct 2014 20:13:08 +0200 Subject: Don't set linejoin and linecap type if query is "nothing" (query value is invalid). (bzr r13628) --- src/widgets/stroke-style.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/widgets/stroke-style.cpp') diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp index 9c8d45908..7477e07ca 100644 --- a/src/widgets/stroke-style.cpp +++ b/src/widgets/stroke-style.cpp @@ -764,7 +764,7 @@ StrokeStyle::setJoinType (unsigned const jointype) break; default: // Should not happen - std::cerr << "StrokeStyle::setJoinType(): Invalid value" << std::endl; + std::cerr << "StrokeStyle::setJoinType(): Invalid value: " << jointype << std::endl; tb = joinMiter; break; } @@ -790,7 +790,7 @@ StrokeStyle::setCapType (unsigned const captype) break; default: // Should not happen - std::cerr << "StrokeStyle::setCapType(): Invalid value" << std::endl; + std::cerr << "StrokeStyle::setCapType(): Invalid value: " << captype << std::endl; tb = capButt; break; } @@ -884,13 +884,15 @@ StrokeStyle::updateLine() miterLimitAdj->set_value(query->stroke_miterlimit.value); // TODO: reflect averagedness? #endif - if (result_join != QUERY_STYLE_MULTIPLE_DIFFERENT) { + if (result_join != QUERY_STYLE_MULTIPLE_DIFFERENT && + result_join != QUERY_STYLE_NOTHING ) { setJoinType(query->stroke_linejoin.value); } else { setJoinButtons(NULL); } - if (result_cap != QUERY_STYLE_MULTIPLE_DIFFERENT) { + if (result_cap != QUERY_STYLE_MULTIPLE_DIFFERENT && + result_cap != QUERY_STYLE_NOTHING ) { setCapType (query->stroke_linecap.value); } else { setCapButtons(NULL); -- cgit v1.2.3