Feature request #4553

Selection color/border size for polygons (with solid fill, no fill, semi-transparent fill)

Added by elcuco - almost 6 years ago. Updated 5 months ago.

Status:Open
Priority:Normal
Assignee:-
Category:Vectors
Pull Request or Patch supplied:No Resolution:
Easy fix?:No

Description

Hi!
When selecting polygons with no fill, is it possible to just put the yellow color on the border, and not in the fill? Or perhaps put the selected fill with transparency (user could control the amount of transparency)? This would help to see the layers that are below the selected polygon.
Best regards,
Pedro

selected.png (191 KB) elcuco -, 11/18/2011 09:03 AM

unselected.png (198 KB) elcuco -, 11/18/2011 09:03 AM

PartlyVisibleSelection.png (39.9 KB) ramon ., 11/19/2011 02:54 PM

udig_single2_solid.png (147 KB) Giovanni Manghi, 11/28/2011 03:17 PM

qgis_single_solid.png (327 KB) Giovanni Manghi, 11/28/2011 03:17 PM

qgis_single2_solid.png (327 KB) Giovanni Manghi, 11/28/2011 03:17 PM

gvsig_single_solid.png (159 KB) Giovanni Manghi, 11/28/2011 03:17 PM

gvsig_single2_solid.png (158 KB) Giovanni Manghi, 11/28/2011 03:17 PM

udig_single_solid.png (141 KB) Giovanni Manghi, 11/28/2011 03:17 PM

udig_semi2.png (141 KB) Giovanni Manghi, 11/28/2011 03:18 PM

qgis_semi.png (188 KB) Giovanni Manghi, 11/28/2011 03:18 PM

gvsig_semi2.png (152 KB) Giovanni Manghi, 11/28/2011 03:18 PM

gvsig_semi.png (158 KB) Giovanni Manghi, 11/28/2011 03:18 PM

gvsig_semi2.png (152 KB) Giovanni Manghi, 11/28/2011 03:18 PM

udig_semi.png (144 KB) Giovanni Manghi, 11/28/2011 03:18 PM

udig_nofill2.png (146 KB) Giovanni Manghi, 11/28/2011 03:19 PM

qgis_nofill.png (188 KB) Giovanni Manghi, 11/28/2011 03:19 PM

qgis_nofill2.png (187 KB) Giovanni Manghi, 11/28/2011 03:19 PM

gvsig_nofill.png (160 KB) Giovanni Manghi, 11/28/2011 03:19 PM

gvsig_nofill2.png (159 KB) Giovanni Manghi, 11/28/2011 03:19 PM

udig_nofill.png (144 KB) Giovanni Manghi, 11/28/2011 03:19 PM

udig_editing2.png (139 KB) Giovanni Manghi, 11/28/2011 03:20 PM

udig_default_transparency_for_vectors.png (140 KB) Giovanni Manghi, 11/28/2011 03:20 PM

qgis_editing.png (165 KB) Giovanni Manghi, 11/28/2011 03:20 PM

gvsig_editing.png (138 KB) Giovanni Manghi, 11/28/2011 03:20 PM

gvsig_editing2.png (142 KB) Giovanni Manghi, 11/28/2011 03:20 PM

udig_editing.png (148 KB) Giovanni Manghi, 11/28/2011 03:20 PM

teste_shp.zip (2.08 KB) Giovanni Manghi, 11/28/2011 03:21 PM

4553_screenshots.html Magnifier (3.5 KB) Alister Hood, 11/28/2011 06:40 PM

symbology.png (20.7 KB) Alister Hood, 12/21/2011 07:05 PM

History

#1 Updated by Giovanni Manghi almost 6 years ago

there is already a ticket for this kind of issue. I have no time to check myself now, please have a look and eventually close the duplicate.

In any way I agree, selection for overlapped polygons can be better than it is now.

#2 Updated by elcuco - almost 6 years ago

Giovanni Manghi wrote:

there is already a ticket for this kind of issue. I have no time to check myself now, please have a look and eventually close the duplicate.

In any way I agree, selection for overlapped polygons can be better than it is now.

Hi Giovanni,
I've found some tickets regarding the rendering of selected polygons but they were for older versions of QGIS. The closest tickets are #1509 and #4537. So I guess my ticket is a little bit different.
For QGIS 1.7.2 and the new symbology engine I haven't found anything like the one describe... The default render of selected unfilled polygons doesn't allow to see what's below so I guess the best way to fix this is when one chooses the unfilled type for polygon symbology, the selected renders only its border.

#3 Updated by Alexander Bruy almost 6 years ago

  • Resolution set to duplicate
  • Status changed from Open to Closed

Duplicate #1509.
Use new symbology, where this bug already was fixed. Old symbology is deprecated.

#4 Updated by elcuco - almost 6 years ago

Alexander Bruy wrote:

Duplicate #1509.
Use new symbology, where this bug already was fixed. Old symbology is deprecated.

I don't think this is the same problem as the #1509. Check out the pictures I send. In the "selected.png" you can't see the points below. The only way to see them is by highlighting the border instead of the fill. If you think that this is a different issue, reopen the ticket.

#5 Updated by ramon . almost 6 years ago

FWIW I think it's differrent to #1509 too.

I had presumed that the "bug" here was the "feature" solution to #1509

But I would caution against not having any fill, unless there was a way to ensure that the selection was always visible. A number of my polygons on my work computer are only partly visible when selected because adjacent polygons being rendered higher in the layer. I'm fairly sure sometimes I have invisible selections for this reason.

#6 Updated by Giovanni Manghi almost 6 years ago

This comment is the follow up of this thread

http://lists.osgeo.org/pipermail/qgis-developer/2011-November/016816.html

where it was asked to have a look how other software behave when it comes to selection with different kind of fills.

Here following my notes together with many screenshots. As it is a long text the conclusions are that it would be nice to implement a few features available on uDIG, especially:

  • semi-transparent selection color
  • border size of selected polygons bigger than unselected ones
  • a new option in the QGIS general options, to let the user choose to add by default new polygons with a specified % of transparency
  • I like also how uDIG behave when editing overlapping polygons, by removing the fill color (and adding the semi-transparent selection color).

If you agree with my conclusions it would be nice if you can help me open new feature requests tickets.

This is the long answer I sent to the developers mailing list.

===========================
I made a few tests comparing how the selection works in qgis, gvsig and udig for overlapped/partially overlapped polygons with fill/partial transparency/no fill.

Solid fill:

The "Select single feature" tool in QGIS the tool does exactly what is expected, it selects only (one) clicked feature. If one polygon is completely above another one, then clicking on it causes qgis to select just it. The same (obviously) if clicking on a polygon in an point that is above another one that is partially overlapped.

In gvSIG and uDIG the "Select feature at point" tool works in a slightly different way, selecting also what is under the selection spot, like the "select features by..." tool in QGIS.

In QGIS and gvSIG if a polygon is completely overlapped and under another one, there is no way to

  • immediately understand is there, looking at the canvas
  • select only the underlying polygon (for example from the attribute table) and have the selection color pop-up, because it is always covered by the above polygon fill/selection color.

On the other hand uDIG behave nicely by using a default transparency level for both the fills (when adding a vector) and the selection color, so the user can immediately see if there are overlapped polygons and also can see if/when there is a selected polygon under another one. This would be a nice option in the QGIS general Options menu (using a default transparency level for fills and selection color).

uDIG has also another nice feature: it makes border width of selected objects bigger of the unselected ones. This is very handy especially when it is used no fill for polygons.

Semi-transparent fill:

In QGIS and gvSIG doesn't change much compared with the solid fill. The selection color is solid so if two overlapping polygons are selected only the above one is visible. If only the underlying one is selected (from the table of attributes) it is visible because the above polygon does not have a solid color.

uDIG as it uses by default semi-transparent selection color so it is same as when using solid fills.

No fill:

In QGIS and gvSIG doesn't change much beside one important case: with two overlapping polygons, with the smaller one completely above the other, when selecting just the underlying one the selection color "fills" also the above one, and the user can say how many polygons are selected only if he/she looks in the attribute table.

In uDIG it happens the same BUT as the border width of selected objects is bigger than unselected ones, the user knows what is selected and what is not by just looking at the map canvas. This seems to me a really nice feature.

There are also a few differences when it comes to editing polygons under other ones.

In QGIS if using the solid fill or when the above is selected, it is not possible to see the borders of the polygon being edited, just the nodes highlighted by the node tool.

in gvSIG when clicking with a edit tool in a spot that is over two overlapping polygons it pop-up a windows to let the user choose what to edit, if the above or the underlying geometry. Once selected the polygon being edited is also given a new color.

In uDIG the fill color of the polygon being edited is removed (as also for the above one) and instead is given the semi-transparent selection color.

#7 Updated by Giovanni Manghi almost 6 years ago

#8 Updated by Giovanni Manghi almost 6 years ago

#10 Updated by Giovanni Manghi almost 6 years ago

#11 Updated by Alister Hood almost 6 years ago

In case anyone wants to see all those screenshots on one page.

#12 Updated by Giovanni Manghi almost 6 years ago

  • Target version changed from Version 1.7.2 to Version 1.7.3

#13 Updated by Giovanni Manghi almost 6 years ago

Giovanni Manghi wrote:

  • semi-transparent selection color
  • a new option in the QGIS general options, to let the user choose to add by default new polygons with a specified % of transparency
  • I like also how uDIG behave when editing overlapping polygons, by removing the fill color (and adding the semi-transparent selection color).

The situation is much better than I though at the beginning, it would be just enough to add a default amount of transparency for both the selection color and the fill of polygons.

Setting the amount of transparency of the selection color is already available in QGIS***. It can be set in both the general options and in project properties. My opinion is that this should be set by default to a value around 180-200 (it is a alpha channel of a RGB scale).

This, coupled with a certain % of transparency for polygons fill, makes the the overall/out the box configuration much better when comes to layers with polygons completely/partially overlapped.

This way basically all the above issues would be "automatically fixed", regardless if they have fill or no fill:

  • see polygons (or parts of) underlapped to other polygons
  • see if/when they are both selected or if is selected just one
  • also it would be "fixed" the issue of not seeing the polygon segments when editing polygons undelapped to others. And the gvSIG approach is not needed anyway because the node tool works only when clicking nearby a vertex.

A bonus help could come from having applied a particular border style for selected polygons and polygons being selected.

The only thing that I see it wouldn't be possible is to select from the canvas just a polygon that is completely underlapped to a another one, but in this case I guess that the right thing to do would be to select it (from the table of attributes), copy and paste (to make a copy above everything else) and then remove it.

I would like to have feedback from you and then propose this changes directly in the developers mailing list.

  • and this by the way, answer the original ticket request

#14 Updated by elcuco - almost 6 years ago

Yes, that would certainly do the trick. I agree that it would be a great help to apply a particular border style for selected polygons and polygons being selected. This combined with the a certain amount of transparency (or full transparency) of the selected polygons will help in deed to see all the features (vectors or rasters) below.

Giovanni Manghi wrote:

Giovanni Manghi wrote:

  • semi-transparent selection color
  • a new option in the QGIS general options, to let the user choose to add by default new polygons with a specified % of transparency
  • I like also how uDIG behave when editing overlapping polygons, by removing the fill color (and adding the semi-transparent selection color).

The situation is much better than I though at the beginning, it would be just enough to add a default amount of transparency for both the selection color and the fill of polygons.

Setting the amount of transparency of the selection color is already available in QGIS***. It can be set in both the general options and in project properties. My opinion is that this should be set by default to a value around 180-200 (it is a alpha channel of a RGB scale).

This, coupled with a certain % of transparency for polygons fill, makes the the overall/out the box configuration much better when comes to layers with polygons completely/partially overlapped.

This way basically all the above issues would be "automatically fixed", regardless if they have fill or no fill:

  • see polygons (or parts of) underlapped to other polygons
  • see if/when they are both selected or if is selected just one
  • also it would be "fixed" the issue of not seeing the polygon segments when editing polygons undelapped to others. And the gvSIG approach is not needed anyway because the node tool works only when clicking nearby a vertex.

A bonus help could come from having applied a particular border style for selected polygons and polygons being selected.

The only thing that I see it wouldn't be possible is to select from the canvas just a polygon that is completely underlapped to a another one, but in this case I guess that the right thing to do would be to select it (from the table of attributes), copy and paste (to make a copy above everything else) and then remove it.

I would like to have feedback from you and then propose this changes directly in the developers mailing list.

  • and this by the way, answer the original ticket request

#15 Updated by Giovanni Manghi almost 6 years ago

  • Target version changed from Version 1.7.3 to Version 1.7.4

#16 Updated by Alister Hood over 5 years ago

Hi guys,
There are some other problems related to this.

e.g. see the big polygon layer in the attached image. The symbols in the marker line symbol layer are yellow when selected, but the symbols in the fill pattern symbol layer retain their normal colour (the former behaviour is essentially the same as for the polyline layer). In my opinion the symbols in the fill pattern symbol layer should also be yellow, and there should not be a yellow fill for the whole polygon. i.e. the polygon fill style should be the same when selected as when not selected, and only the colours should change.

Now, look at the point layer in the top left, and imagine that "specify fill style for point markers" was implemented (it was implemented in old symbology, and there is a patch for new symbology). If you also applied my reasoning from above for point layers (fill style should be the same when selected), and changed the fill style of this symbol to "no brush", then there would be no way to distinguish the selected feature from all those that aren't selected, because (unlike polygon layers, as you can see in the bottom right) the pen colour does not change when selected, only the fill colour changes.

I guess there should thus be a standard "pen colour" AND a "brush colour" for selected features (possibly both yellow by default?), and all other aspects of rendering should not change (fill styles, symbols, line widths, transparency). But then there would still be no way to see selected features when they are hidden underneath other features!

Instead of all that complication, why not just render selected features in the same way that "identified" features are rendered?
i.e. Features would be rendered exactly the same whether or not they are selected. But the "identified" feature would also be redrawn over the top of all layers, with a standard outline and semi-transparent fill.
This seems to work very well for the identify tool. What do you think?

#17 Updated by Alister Hood over 5 years ago

#18 Updated by Martin Dobias over 5 years ago

Having a semi-transparent color for selection (by default) seems like a good idea.

But using transparency for fill color by default also for rendering of unselected features should be avoided because it affects rendering speed. (With selection it is tolerable)

First of all we would need color dialogs to support alpha channel. Later we could add transparency for whole renderer (as with old symbology).

#19 Updated by Giovanni Manghi over 5 years ago

  • Target version changed from Version 1.7.4 to Version 2.0.0

#20 Updated by Pirmin Kalberer almost 5 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

#21 Updated by Giovanni Manghi 5 months ago

  • Easy fix? set to No

Also available in: Atom PDF