Skip to content

Commit 3696d69

Browse files
committed
Fix lack of context in negated volume
1 parent da5acdc commit 3696d69

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎paths_cli/wizard/volumes.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ def _binary_func_volume(wizard, context, op):
2121
vol = op(vol1, vol2)
2222
return vol
2323

24+
2425
_LAMBDA_HELP = ("This is the {minmax} boundary value for this volume. "
2526
"Note that periodic CVs will correctly wrap values "
2627
"outside the periodic bounds.")
2728
_LAMBDA_STR = ("What is the {minmax} allowed value for "
2829
"'{{obj_dict[cv].name}}' in this volume?")
30+
2931
CV_DEFINED_VOLUME_PLUGIN = WizardParameterObjectPlugin.from_proxies(
3032
name="CV-defined volume (allowed values of CV)",
3133
category="volume",
@@ -77,12 +79,14 @@ def _binary_func_volume(wizard, context, op):
7779
name='Complement of a volume (not in given volume)',
7880
category='volume',
7981
intro="This volume will be everything not in the subvolume.",
80-
builder=lambda wizard, context: ~VOLUMES_PLUGIN(wizard, context),
82+
builder=lambda wizard, context: ~VOLUMES_PLUGIN(
83+
wizard, volume_set_context(wizard, context, None)
84+
),
8185
)
8286

8387
_FIRST_STATE = ("Now let's define state states for your system. "
8488
"You'll need to define {n_states_string} of them.")
85-
_ADDITIONAL_STATES = "Okay, let's define another stable state"
89+
_ADDITIONAL_STATES = "Okay, let's define another stable state."
8690
_VOL_DESC = ("You can describe this as either a range of values for some "
8791
"CV, or as some combination of other such volumes "
8892
"(i.e., intersection or union).")

0 commit comments

Comments
 (0)