@@ -209,6 +209,8 @@ CuttingSurfaceInteraction::getParameters()
209209 int numoptions;
210210 char **labels;
211211 inter_->getChoiceParam (OPTION , numoptions, labels, option_);
212+
213+ inter_->getBooleanParam (" flip" , flip_);
212214}
213215
214216void CuttingSurfaceInteraction::createMenu (bool invertClip)
@@ -221,15 +223,11 @@ void CuttingSurfaceInteraction::createMenu(bool invertClip)
221223 clipInvertCheckbox_->setCallback (
222224 [this ](bool state)
223225 {
226+ plugin->getSyncInteractors (inter_);
224227 plugin->setBooleanParam (" flip" , state);
225228 plugin->executeModule ();
226-
227- if (clipPlaneFlipCheckbox_)
228- {
229- bool flip = clipPlaneFlipCheckbox_->state ();
230- clipPlaneFlipCheckbox_->setState (!flip);
231- }
232229 });
230+ clipInvertCheckbox_->setState (flip_ != 0 );
233231 }
234232
235233 optionChoice_ = new ui::SelectionList (menu_, " SurfaceStyle" );
@@ -285,6 +283,7 @@ void CuttingSurfaceInteraction::createMenu(bool invertClip)
285283 break ;
286284 }
287285 }
286+ plugin->getSyncInteractors (inter_);
288287 plugin->executeModule ();
289288 }
290289 });
@@ -385,6 +384,11 @@ CuttingSurfaceInteraction::updateMenu()
385384 break ;
386385 }
387386
387+ if (clipInvertCheckbox_)
388+ {
389+ clipInvertCheckbox_->setState (flip_ != 0 );
390+ }
391+
388392 updatePickInteractors (showPickInteractor_);
389393 updateDirectInteractors (showDirectInteractor_);
390394}
0 commit comments