https://issues.qgis.org/https://issues.qgis.org/favicon.ico2015-06-14T07:14:10ZQGIS Issue TrackingQGIS Application - Feature request #12879: isSelected operator to define expression baswesd style on selectionhttps://issues.qgis.org/issues/12879?journal_id=623652015-06-14T07:14:10ZMatthias Kuhn
<ul></ul><p>Nice feature request!</p>
<p>I wonder however if there is any performance benefit for adding a selected property to the feature. On the one hand I think that looking up a feature id in a QSet of feature ids is very fast. Possible performance problems would need to be proven first. On the other hand I don't see a way around a lookup anyway, if it's not done in the expression, it will be done in the layer iterator (get feature from provider -> set selected property). However if it is done in the layer iterator it will also be done when the property is not required.</p>
<p>So IMO, best to (shallow) copy the set of selected feature ids to the expression context and do the check in an expression function.</p> QGIS Application - Feature request #12879: isSelected operator to define expression baswesd style on selectionhttps://issues.qgis.org/issues/12879?journal_id=623662015-06-14T07:16:05ZMatthias Kuhn
<ul></ul><p>And a note for people stumbling upon this report and looking for a workaround: Get the <a class="external" href="https://github.com/NathanW2/qgsexpressionsplus">https://github.com/NathanW2/qgsexpressionsplus</a> plugin and use the isselected method for the moment.</p> QGIS Application - Feature request #12879: isSelected operator to define expression baswesd style on selectionhttps://issues.qgis.org/issues/12879?journal_id=639162015-09-29T15:51:12ZNyall Dawson
<ul><li><strong>Assignee</strong> deleted (<del><i>Nyall Dawson</i></del>)</li></ul> QGIS Application - Feature request #12879: isSelected operator to define expression baswesd style on selectionhttps://issues.qgis.org/issues/12879?journal_id=764632017-04-30T22:47:17ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Easy fix?</strong> set to <i>No</i></li></ul> QGIS Application - Feature request #12879: isSelected operator to define expression baswesd style on selectionhttps://issues.qgis.org/issues/12879?journal_id=986582019-01-22T03:36:28ZNyall Dawson
<ul><li><strong>Resolution</strong> set to <i>fixed/implemented</i></li><li><strong>Description</strong> updated (<a href="/journals/diff/98658?detail_id=87191" title="View differences">diff</a>)</li><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Implemented in 3.2? 3.0? Anyway, it's in 3.4</p>