]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiIndices.cpp
Fix the tab ordering of GuiDocument components.
[lyx.git] / src / frontends / qt4 / GuiIndices.cpp
index 7c21e70acb49ae97fabb1b2b120cb5f4f3ffe7c6..8694b98cd74184171128ceb621e881138e5a1176 100644 (file)
@@ -60,6 +60,9 @@ GuiIndices::GuiIndices(QWidget * parent)
                QString const command = toqstr(*it).left(toqstr(*it).indexOf(" "));
                indexCO->addItem(command, command);
        }
+
+       indexOptionsLE->setValidator(new NoNewLineValidator(indexOptionsLE));
+       newIndexLE->setValidator(new NoNewLineValidator(newIndexLE));
 }
 
 void GuiIndices::update(BufferParams const & params)
@@ -82,14 +85,14 @@ void GuiIndices::update(BufferParams const & params)
        int const pos = indexCO->findData(toqstr(command));
        if (pos != -1) {
                indexCO->setCurrentIndex(pos);
-               indexOptionsED->setText(toqstr(options).trimmed());
+               indexOptionsLE->setText(toqstr(options).trimmed());
        } else {
                // We reset to default if we do not know the specified compiler
                // This is for security reasons
                indexCO->setCurrentIndex(indexCO->findData(toqstr("default")));
-               indexOptionsED->clear();
+               indexOptionsLE->clear();
        }
-       indexOptionsED->setEnabled(
+       indexOptionsLE->setEnabled(
                indexCO->currentIndex() != 0);
 
        updateView();
@@ -145,7 +148,7 @@ void GuiIndices::apply(BufferParams & params) const
        string const index_command =
                fromqstr(indexCO->itemData(
                        indexCO->currentIndex()).toString());
-       string const index_options = fromqstr(indexOptionsED->text());
+       string const index_options = fromqstr(indexOptionsLE->text());
        if (index_command == "default" || index_options.empty())
                params.index_command = index_command;
        else
@@ -155,13 +158,13 @@ void GuiIndices::apply(BufferParams & params) const
 
 void GuiIndices::on_indexCO_activated(int n)
 {
-       indexOptionsED->setEnabled(
+       indexOptionsLE->setEnabled(
                indexCO->itemData(n).toString() != "default");
        changed();
 }
 
 
-void GuiIndices::on_indexOptionsED_textChanged(QString)
+void GuiIndices::on_indexOptionsLE_textChanged(QString)
 {
        changed();
 }