]> git.lyx.org Git - features.git/commitdiff
Remove that pesky broken window that pops up with Qt5 when saving preferences
authorGuillaume Munch <gm@lyx.org>
Sat, 11 Jun 2016 09:54:30 +0000 (10:54 +0100)
committerGuillaume Munch <gm@lyx.org>
Sun, 12 Jun 2016 18:17:33 +0000 (19:17 +0100)
It turns out this show event is not necessary (tested with Qt4.8 and Qt5)

src/frontends/qt4/LayoutBox.cpp

index 1054a098121fdba9527ae9ee284ce6692ee20631..09dd878b38f34e210327befb773a2ecd60b4ed80 100644 (file)
@@ -638,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;
@@ -677,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();
 }