summaryrefslogtreecommitdiffstats
path: root/src/gradient-drag.cpp
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2012-11-30 12:35:42 +0000
committerJohn Smith <john.smith7545@yahoo.com>2012-11-30 12:35:42 +0000
commit4b3c78c2b08883810527be30f9ba9937d6a8dc5a (patch)
tree96f6fac4d14f4ffc2d7692726b0aac8d01a01a5b /src/gradient-drag.cpp
parentFix for 255792 : Calligraphy tool presets management (diff)
downloadinkscape-4b3c78c2b08883810527be30f9ba9937d6a8dc5a.tar.gz
inkscape-4b3c78c2b08883810527be30f9ba9937d6a8dc5a.zip
Fix for 1084341 : Gradient Tool : Hide gradient handles on a solid color swatch
(bzr r11917)
Diffstat (limited to 'src/gradient-drag.cpp')
-rw-r--r--src/gradient-drag.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index c775a19d7..69b9db92d 100644
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
@@ -2080,7 +2080,7 @@ void GrDrag::updateDraggers()
if (style && (style->fill.isPaintserver())) {
SPPaintServer *server = style->getFillPaintServer();
- if ( server && server->isSolid() ) {
+ if ( server && (server->isSolid() || SP_GRADIENT(server)->getVector()->isSolid()) ) {
// Suppress "gradientness" of solid paint
} else if ( SP_IS_LINEARGRADIENT(server) ) {
addDraggersLinear( SP_LINEARGRADIENT(server), item, Inkscape::FOR_FILL );
@@ -2094,7 +2094,7 @@ void GrDrag::updateDraggers()
if (style && (style->stroke.isPaintserver())) {
SPPaintServer *server = style->getStrokePaintServer();
- if ( server && server->isSolid() ) {
+ if ( server && (server->isSolid() || SP_GRADIENT(server)->getVector()->isSolid()) ) {
// Suppress "gradientness" of solid paint
} else if ( SP_IS_LINEARGRADIENT(server) ) {
addDraggersLinear( SP_LINEARGRADIENT(server), item, Inkscape::FOR_STROKE );
@@ -2145,7 +2145,7 @@ void GrDrag::updateLines()
if (style && (style->fill.isPaintserver())) {
SPPaintServer *server = item->style->getFillPaintServer();
- if ( server && server->isSolid() ) {
+ if ( server && (server->isSolid() || SP_GRADIENT(server)->getVector()->isSolid()) ) {
// Suppress "gradientness" of solid paint
} else if ( SP_IS_LINEARGRADIENT(server) ) {
addLine(item, getGradientCoords(item, POINT_LG_BEGIN, 0, Inkscape::FOR_FILL), getGradientCoords(item, POINT_LG_END, 0, Inkscape::FOR_FILL), Inkscape::FOR_FILL);
@@ -2204,7 +2204,7 @@ void GrDrag::updateLines()
if (style && (style->stroke.isPaintserver())) {
SPPaintServer *server = item->style->getStrokePaintServer();
- if ( server && server->isSolid() ) {
+ if ( server && (server->isSolid() || SP_GRADIENT(server)->getVector()->isSolid()) ) {
// Suppress "gradientness" of solid paint
} else if ( SP_IS_LINEARGRADIENT(server) ) {
addLine(item, getGradientCoords(item, POINT_LG_BEGIN, 0, Inkscape::FOR_STROKE), getGradientCoords(item, POINT_LG_END, 0, Inkscape::FOR_STROKE), Inkscape::FOR_STROKE);