]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/LayoutBox.cpp
Properly support the cite engines in the GUI
[lyx.git] / src / frontends / qt4 / LayoutBox.cpp
index 1ca7a1eba7c24c6346b6405121d15f724e289f62..09dd878b38f34e210327befb773a2ecd60b4ed80 100644 (file)
@@ -103,9 +103,14 @@ public:
 //
 /////////////////////////////////////////////////////////////////////
 
-struct LayoutBox::Private
+class LayoutBox::Private
 {
+       /// noncopyable
+       Private(Private const &);
+       void operator=(Private const &);
+public:
        Private(LayoutBox * parent, GuiView & gv) : p(parent), owner_(gv),
+               inset_(0),
                // set the layout model with two columns
                // 1st: translated layout names
                // 2nd: raw layout names
@@ -633,6 +638,7 @@ void LayoutBox::updateContents(bool reset)
        if (!bv) {
                d->model_->clear();
                setEnabled(false);
+               setMinimumWidth(sizeHint().width());
                d->text_class_.reset();
                d->inset_ = 0;
                return;
@@ -672,13 +678,10 @@ void LayoutBox::updateContents(bool reset)
 
        set(d->owner_.currentBufferView()->cursor().innerParagraph().layout().name());
        d->countCategories();
-       
-       // needed to recalculate size hint
-       hide();
+
        setMinimumWidth(sizeHint().width());
        setEnabled(!bv->buffer().isReadonly() &&
                lyx::getStatus(FuncRequest(LFUN_LAYOUT)).enabled());
-       show();
 }