]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCollapsable.cpp
Move isMultiCell() to Cursor, and use it.
[lyx.git] / src / insets / InsetCollapsable.cpp
index cd37ba003fc83163e046c1a4440c11e88d3572e7..b31beff245beaa1ef2c5db5e60ce94baf7e4e177 100644 (file)
@@ -86,7 +86,7 @@ InsetCollapsable::InsetCollapsable(Buffer const & buf,
        setAutoBreakRows(true);
        setDrawFrame(true);
        setFrameColor(Color_collapsableframe);
-       paragraphs().back().setLayout(dc.emptyLayout());
+       paragraphs().back().setLayout(dc.plainLayout());
 }
 
 
@@ -147,7 +147,7 @@ void InsetCollapsable::setLayout(DocumentClass const * const dc)
                layout_ = &(dc->insetLayout(name()));
                labelstring_ = translateIfPossible(layout_->labelstring());
        } else {
-               layout_ = &DocumentClass::emptyInsetLayout();
+               layout_ = &DocumentClass::plainInsetLayout();
                labelstring_ = _("UNDEFINED");
        }
 
@@ -167,7 +167,7 @@ void InsetCollapsable::write(ostream & os) const
                break;
        }
        os << "\n";
-       text_.write(buffer(), os);
+       text().write(buffer(), os);
 }
 
 
@@ -529,7 +529,8 @@ void InsetCollapsable::doDispatch(Cursor & cur, FuncRequest & cmd)
                break;
 
        case LFUN_MOUSE_RELEASE:
-               if (geometry() == NoButton || !hitButton(cmd)) {
+               if (geometry() == NoButton 
+                       || (geometry() != ButtonOnly && !hitButton(cmd))) {
                        // The mouse click has to be within the inset!
                        InsetText::doDispatch(cur, cmd);
                        break;
@@ -647,7 +648,6 @@ bool InsetCollapsable::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_ACCENT_UNDERBAR:
        case LFUN_ACCENT_UNDERDOT:
        case LFUN_APPENDIX:
-       case LFUN_BIBITEM_INSERT:
        case LFUN_BOX_INSERT:
        case LFUN_BRANCH_INSERT:
        case LFUN_NEWLINE_INSERT:
@@ -849,7 +849,7 @@ void InsetCollapsable::validate(LaTeXFeatures & features) const
 bool InsetCollapsable::undefined() const
 {
        docstring const & n = getLayout().name();
-       return n.empty() || n == DocumentClass::emptyInsetLayout().name();
+       return n.empty() || n == DocumentClass::plainInsetLayout().name();
 }