Show keyboard binding when a layout selection is done in LayoutBox

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.
This commit is contained in:
Jean-Marc Lasgouttes 2012-10-11 00:21:38 +02:00
parent ddd0ff971a
commit 06f394a3d4

View 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);