From ec576b36f133cec6fd7e523d9c99fb90dc658d19 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Fri, 25 Jun 2021 11:45:43 +0100 Subject: [PATCH] Add a default filter to CS tables This fixes the single most annoying issue of OpenMW-CS: inability for users to filter records in the table if they don't happen to know by heart the syntax of the very powerful filter engine. Because simply typing the text into the search field did not work. Now, existence of .* suggests that regex is used, and users still can replace the text with a custom filter if they wish. --- apps/opencs/view/filter/editwidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/opencs/view/filter/editwidget.cpp b/apps/opencs/view/filter/editwidget.cpp index 6b585591fa..2c2f4443df 100644 --- a/apps/opencs/view/filter/editwidget.cpp +++ b/apps/opencs/view/filter/editwidget.cpp @@ -42,6 +42,8 @@ CSVFilter::EditWidget::EditWidget (CSMWorld::Data& data, QWidget *parent) addAction (mHelpAction); auto* openHelpShortcut = new CSMPrefs::Shortcut("help", this); openHelpShortcut->associateAction(mHelpAction); + + setText("!string(\"ID\", \".*\")"); } void CSVFilter::EditWidget::textChanged (const QString& text)