Opened 13 years ago

Closed 13 years ago

#3845 closed bug (fixed)

rule based renderer doesn't properly handle %

Reported by: strk Owned by: nobody
Priority: major: does not work as expected Milestone: Version 1.7.0
Component: Symbology Version: Trunk
Keywords: Cc:
Must Fix for Release: Yes Platform: Debian
Platform Version: Awaiting user input: no

Description

The rule based renderer doesn't accept % in the filter:

(edge_id % 10) = 1

Filter expression parsing error:
syntax error, unexpected Unknown_CHARACTER
name like 'some%'

Filter expression parsing error:
syntax error, unexpected Unknown_CHARACTER, expecting $end

Change History (6)

comment:1 by strk, 13 years ago

Fixed here:

The following changes since commit 2670283b06637e1d753bd2ee9076ce505d92792d:
  Radim Blazek (1):
        Merge branch 'master' of github.com:qgis/Quantum-GIS

are available in the git repository at:

  git@github.com:strk/Quantum-GIS.git bug3845

Sandro Santilli (1):
      Add support for modulo operator (%) in rule based rendering. See ticket #3845.

 src/core/qgssearchstringlexer.ll  |    2 +-
 src/core/qgssearchstringparser.yy |    1 +
 src/core/qgssearchtreenode.cpp    |    5 +++++
 src/core/qgssearchtreenode.h      |    1 +
 4 files changed, 8 insertions(+), 1 deletions(-)

comment:2 by strk, 13 years ago

Note: my branch is rooted at master, not release_1_7_0

comment:3 by strk, 13 years ago

Must Fix for Release: NoYes

comment:4 by strk, 13 years ago

Example style being possible with the fix:

http://strk.keybit.net/tmp/edge_style.qml

Would love to make it even more general by not hard-coding colors but rather reference offsets in a built-in palette, but that's offtopic in this ticket :)

comment:5 by strk, 13 years ago

Oops, the pull request above had wrong repo uri (required an account). This should be better: git://github.com/strk/Quantum-GIS.git Branch name is still the same.

comment:6 by jef, 13 years ago

Resolution: fixed
Status: newclosed

applied in commit c2757d31bc3a2d463b7f1e376b62f6046820a2e0

Note: See TracTickets for help on using tickets.