- InsetCollapsable::insetButtonRelease(bv, x, y, button);
+ if (!width_.zero()) {
+ int ww1 = latexTextWidth(bv);
+ int ww2 = InsetCollapsable::getMaxWidth(bv, inset);
+ if (ww2 > 0 && ww2 < ww1) {
+ return ww2;
+ }
+ return ww1;
+ }
+ // this should not happen!
+ return InsetCollapsable::getMaxWidth(bv, inset);