]> git.lyx.org Git - lyx.git/commitdiff
Show keyboard binding when a layout selection is done in LayoutBox
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 10 Oct 2012 22:21:38 +0000 (00:21 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 10 Oct 2012 22:21:38 +0000 (00:21 +0200)
The obnoxious messages in Private::setFilter cover any message set by lyx::dispatch. The solution I chose is to return early when the filter is not changed.

If this makes sense, then the same optimization should be added to CategorizedCombo, IMO.

src/frontends/qt4/LayoutBox.cpp

index 94604278ceb1fdd3bc59fdaaf9b919c5a0ffb9f4..aa22e60eaca8d2290dd4e43d15f7842aa7a2230f 100644 (file)
@@ -350,6 +350,10 @@ static QString charFilterRegExp(QString const & filter)
 
 void LayoutBox::Private::setFilter(QString const & s)
 {
+       // exit early if nothing has to be done
+       if (filter_ == s)
+               return;
+
        bool enabled = p->view()->updatesEnabled();
        p->view()->setUpdatesEnabled(false);