+ if (!widthCollapsed) {
+ widthCollapsed = width_collapsed(bv->painter(), font);
+ inset->deleteLyXText(bv);
+ need_update = FULL;
+ if (owner()) {
+ owner()->update(bv, font, dodraw);
+ return;
+ }
+ }
+ if (oldWidth != width(bv->painter(), font)) {
+ oldWidth = width(bv->painter(), font);
+ inset->deleteLyXText(bv);
+ need_update = FULL;
+ if (owner()) {
+ owner()->update(bv, font, dodraw);
+ return;
+ }
+ }
+ inset->update(bv, font, dodraw);
+}
+
+UpdatableInset::RESULT
+InsetCollapsable::LocalDispatch(BufferView * bv, int action, string const & arg)
+{
+ UpdatableInset::RESULT result = inset->LocalDispatch(bv, action, arg);
+ if (result == FINISHED)
+ bv->unlockInset(this);
+ return result;
+}
+
+bool InsetCollapsable::LockInsetInInset(BufferView * bv, UpdatableInset * in)
+{
+ if (inset == in)
+ return true;
+ return inset->LockInsetInInset(bv, in);
+}
+
+
+bool InsetCollapsable::UnlockInsetInInset(BufferView * bv, UpdatableInset * in,
+ bool lr)
+{
+ if (inset == in) {
+ bv->unlockInset(this);
+ return true;
+ }
+ return inset->UnlockInsetInInset(bv, in, lr);
+}
+
+
+bool InsetCollapsable::UpdateInsetInInset(BufferView * bv, Inset *in)
+{
+ if (in == inset)
+ return true;
+ return inset->UpdateInsetInInset(bv, in);
+}
+
+
+int InsetCollapsable::InsetInInsetY()
+{
+ return inset->InsetInInsetY();
+}
+
+
+void InsetCollapsable::Validate(LaTeXFeatures & features) const
+{
+ inset->Validate(features);