Fix another bug in selection subexpression handling.
authorTeemu Murtola <teemu.murtola@gmail.com>
Tue, 9 Apr 2013 18:57:15 +0000 (21:57 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Wed, 10 Apr 2013 03:59:01 +0000 (06:59 +0300)
commitc049a1ce78373e0eb94d15f11619b1af9a256be5
treeb2bdd90e2032ab70d183a7bf43d0a25c7fe7e7f5
parent076c4dec9135e5486e9e2a43b88cd3255cfa011e
Fix another bug in selection subexpression handling.

In this case, it did not work correctly if a variable with a dynamic
value was used both
1. in a boolean expression such that its evaluation group was not known
   in advance, and
2. in a context where it was always evaluated for all atoms (either as
   a selection, or as a parameter to a selection method),
and additionally the latter context appeared later in the selection set.
The initialization of the SEL_CDATA_STATICEVAL flag has a dependency on
SEL_CDATA_FULLEVAL flag, and they were not initialized in the correct
sequence in the above case.

Fixes #1219.

Change-Id: Ic95d37a424c82c796806b3a5b39678e206c467a1
src/gromacs/selection/compiler.cpp
src/gromacs/selection/tests/refdata/SelectionCollectionDataTest_HandlesVariablesWithMixedEvaluationGroups2.xml [new file with mode: 0644]
src/gromacs/selection/tests/selectioncollection.cpp