]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/TocWidget.cpp
Fix bug #6661: Outliner filter bar should not be case sensitive.
[lyx.git] / src / frontends / qt4 / TocWidget.cpp
index 8d8c00e4e1d7fcbc41b7688ac2d84cc245bbdf72..80e867c7d1d05e3ce1b80f9e7fc87364c3c7b296 100644 (file)
@@ -139,7 +139,7 @@ bool TocWidget::getStatus(Cursor & cur, FuncRequest const & cmd,
        TocItem const & item =
                gui_view_.tocModels().currentItem(current_type_, index);
 
-       switch (cmd.action)
+       switch (cmd.action())
        {
        case LFUN_CHANGE_ACCEPT:
        case LFUN_CHANGE_REJECT:
@@ -179,7 +179,7 @@ void TocWidget::doDispatch(Cursor & cur, FuncRequest const & cmd)
        // Start an undo group.
        cur.beginUndoGroup();
 
-       switch (cmd.action)
+       switch (cmd.action())
        {
        case LFUN_CHANGE_ACCEPT:
        case LFUN_CHANGE_REJECT:
@@ -200,7 +200,7 @@ void TocWidget::doDispatch(Cursor & cur, FuncRequest const & cmd)
        case LFUN_OUTLINE_DOWN:
        case LFUN_OUTLINE_IN:
        case LFUN_OUTLINE_OUT:
-               outline(cmd.action);
+               outline(cmd.action());
                break;
 
        default:
@@ -315,11 +315,6 @@ void TocWidget::on_typeCO_currentIndexChanged(int index)
 {
        current_type_ = typeCO->itemData(index).toString();
        updateView();
-       // In Qt 4.6.x, we can end up here programmatically, when the
-       // model is rebuilt. But the Buffer may not be ready for us to
-       // reset focus, start the cursor, etc. So we check to see if the
-       // combo box has focus. It will, if the user has changed the 
-       // value.
        if (typeCO->hasFocus())
                gui_view_.setFocus();
 }
@@ -460,7 +455,7 @@ void TocWidget::filterContents()
                QModelIndex index = indices[i];
                bool const matches =
                        index.data().toString().contains(
-                               filterLE->text(), Qt::CaseSensitive);
+                               filterLE->text(), Qt::CaseInsensitive);
                tocTV->setRowHidden(index.row(), index.parent(), !matches);
        }
        // recursively unhide parents of unhidden children