]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/LengthCombo.cpp
Fix reloading of local layout file (bug #11120)
[lyx.git] / src / frontends / qt4 / LengthCombo.cpp
index 8e57af1ca6958cbf5ac6a1ac32e440e252bc7016..6eacfbfb36d715d5ae2a2586cde557d7232f3084 100644 (file)
@@ -21,6 +21,9 @@
 #include <string>
 
 
+namespace lyx {
+namespace frontend {
+
 LengthCombo::LengthCombo(QWidget * parent)
        : QComboBox(parent)
 {
@@ -58,7 +61,7 @@ void LengthCombo::setCurrentItem(lyx::Length::UNIT unit)
 }
 
 
-void LengthCombo::setCurrentItem(QString const item)
+void LengthCombo::setCurrentItem(QString const item)
 {
        int num = QComboBox::count();
        for (int i = 0; i < num; i++) {
@@ -95,6 +98,14 @@ void LengthCombo::noPercents()
 }
 
 
+void LengthCombo::removeFontDependent()
+{
+       removeUnit(Length::EM);
+       removeUnit(Length::EX);
+       removeUnit(Length::MU);
+}
+
+
 void LengthCombo::removeUnit(lyx::Length::UNIT unit)
 {
        QString const val = lyx::toqstr(lyx::stringFromUnit(unit));
@@ -122,5 +133,7 @@ void LengthCombo::addUnit(lyx::Length::UNIT unit)
                   lyx::toqstr(lyx::unit_name[int(unit)]));
 }
 
+} // namespace frontend
+} // namespace lyx
 
 #include "moc_LengthCombo.cpp"