From: Stefan Schimanski Date: Wed, 5 Mar 2008 16:02:18 +0000 (+0000) Subject: * clear filter when showing popup of layout list X-Git-Tag: 1.6.10~5863 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=107faacf0e4a73c6b1285be5744d54635fd82324;p=features.git * clear filter when showing popup of layout list * show filter hint in status bar git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23481 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiToolbar.cpp b/src/frontends/qt4/GuiToolbar.cpp index e0b9e6ce3a..0638ef13d2 100644 --- a/src/frontends/qt4/GuiToolbar.cpp +++ b/src/frontends/qt4/GuiToolbar.cpp @@ -431,7 +431,7 @@ void GuiLayoutBox::setFilter(QString const & s) // FIXME: There must be a better way. The QComboBox::AdjustToContents) // does not help. if (view()->isVisible()) - showPopup(); + QComboBox::showPopup(); } @@ -441,6 +441,14 @@ void GuiLayoutBox::resetFilter() } +void GuiLayoutBox::showPopup() +{ + resetFilter(); + owner_.message(_("Enter characters to filter the layout list.")); + QComboBox::showPopup(); +} + + bool GuiLayoutBox::eventFilter(QObject * o, QEvent * e) { if (e->type() != QEvent::KeyPress) diff --git a/src/frontends/qt4/GuiToolbar.h b/src/frontends/qt4/GuiToolbar.h index c480cb7438..e5b869caa0 100644 --- a/src/frontends/qt4/GuiToolbar.h +++ b/src/frontends/qt4/GuiToolbar.h @@ -52,6 +52,9 @@ public: /// Add Item to Layout box according to sorting settings from preferences void addItemSort(docstring const & item, bool sorted); + /// + void showPopup(); + /// bool eventFilter(QObject * o, QEvent * e); ///