Hi Roxo,

I can't reproduce. Of course I don't have your data source, but that shouldn't 
be the reason. I use PostGIS-Data and use a integer-field with three possible 
values (1,2 or 3) to do a rule based fill color selection similar to yours. 
I'm using QGIS 2.18.12, Polygon data from PostGIS, single symbol, simple fill, 
outline color #ff0000, outline with 2mm, fill color by following expression: 
CASE 
WHEN  "field1" = 1 THEN '0,0,255'
WHEN  "field2" = 2 THEN '255,255,0'
ELSE '0,255,0'
END
Works as expected, the fill color is choosen by the expression as expected and 
the outline color allways stays the same as selected in the style menu. Can't 
imagine how fill color setting influences outline color selection. Anyway, as 
I'm using expressions for color selection very often, im courious for the 
reason of the problem you encounter!

Regards
Benjamin



-----Ursprüngliche Nachricht-----
Von: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] Im Auftrag von 
Fernando M. Roxo da Motta
Gesendet: Montag, 9. Oktober 2017 14:58
An: qgis-user@lists.osgeo.org
Betreff: [Qgis-user] Color fill expression and outline color.



  Hi all,


  I am working with  a very simple polygon layer and used a single
symbol style with a simple color fill.   I used an expression to
determine the color to fill the area.   The expression is:

  case
     when "arremat" = 0 then   '0,180,0,50'
     when "arremat" = 1 then   '0,180,0,255'
  end

  Obs: first I used "rgba_color(0,180,0,x)" and changed to the string.
       both worked as expected.

  So far so good.   The color selection worked fine.   The problem I
am having is that the outline is not being draw, or it is being drawn with the 
selected color of the color fill.

  Is that as expected or is this an "undocumented feature"? (AKA bug)

  I solved this problem using the Rule-based styling, but decided to report 
just in case.


  Regards.



  Roxo

--
---------------- Non luctari, ludare -------------------+ WYSIWYG
Fernando M. Roxo da Motta <pe...@roxo.org>              | Editor?
Except where explicitly stated I speak on my own behalf.|  VI !!
      ( Usuário Linux registrado #39505 )               | I see text,
------------ Quis custodiet ipsos custodes?-------------+ I get text!
 
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to