From ba603db9427d208793a73c67cb97d5c09c91fdee Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Fri, 6 Jun 2014 16:14:24 +0200 Subject: [PATCH] Fix bug #9153 (Using mathpanel to insert matrix creates extra space on top) The code was setting the current index before filling the combo box items. --- src/frontends/qt4/GuiMathMatrix.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/frontends/qt4/GuiMathMatrix.cpp b/src/frontends/qt4/GuiMathMatrix.cpp index 8106629d99..457b749f5b 100644 --- a/src/frontends/qt4/GuiMathMatrix.cpp +++ b/src/frontends/qt4/GuiMathMatrix.cpp @@ -63,6 +63,11 @@ GuiMathMatrix::GuiMathMatrix(GuiView & lv) { setupUi(this); + for (int i = 0; *VertAligns[i]; ++i) + valignCO->addItem(qt_(VertAligns[i])); + for (int i = 0; *DecoChars[i]; ++i) + decorationCO->addItem(qt_(DecoChars[i])); + table->setMinimumSize(100, 100); rowsSB->setValue(5); columnsSB->setValue(5); @@ -91,11 +96,6 @@ GuiMathMatrix::GuiMathMatrix(GuiView & lv) connect(decorationCO, SIGNAL(activated(int)), this, SLOT(decorationChanged(int))); - for (int i = 0; *VertAligns[i]; ++i) - valignCO->addItem(qt_(VertAligns[i])); - for (int i = 0; *DecoChars[i]; ++i) - decorationCO->addItem(qt_(DecoChars[i])); - bc().setPolicy(ButtonPolicy::IgnorantPolicy); }