]> git.lyx.org Git - features.git/commitdiff
* clear filter when showing popup of layout list
authorStefan Schimanski <sts@lyx.org>
Wed, 5 Mar 2008 16:02:18 +0000 (16:02 +0000)
committerStefan Schimanski <sts@lyx.org>
Wed, 5 Mar 2008 16:02:18 +0000 (16:02 +0000)
* show filter hint in status bar

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23481 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiToolbar.cpp
src/frontends/qt4/GuiToolbar.h

index e0b9e6ce3a8fb611aa4e3d740412b443fb786e1d..0638ef13d23c6925e4c44b670f95599e4a60b6bc 100644 (file)
@@ -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)
index c480cb7438a897cae3c7ca8a61ace605343bbaf0..e5b869caa0ff8f4f60df956baa330610a7de751b 100644 (file)
@@ -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);
        ///