]> git.lyx.org Git - lyx.git/commitdiff
Fix a small glitch
authorEnrico Forestieri <forenr@lyx.org>
Wed, 7 Jun 2017 13:31:13 +0000 (15:31 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Wed, 7 Jun 2017 13:31:13 +0000 (15:31 +0200)
When choosing a code language that has dialects in the languages
combo box, the dialects combo gets activated also when minted is
in use. However, minted does not support the concept of dialects
and the combo should not be enabled. This is harmless because the
dialects are simply ignored and the dialects status is restored
after apply, but it may fool the user in thinking that a dialect
can be actually selected. So, always disable it with minted.

src/frontends/qt4/GuiListings.cpp

index 561022f595423138571d6892426a458cd75addc4..1ab7c7e383b6b1a57d119dad3ca75c60952b6bfe 100644 (file)
@@ -433,7 +433,8 @@ void GuiListings::on_languageCO_currentIndexChanged(int index)
                }
        }
        dialectCO->setCurrentIndex(default_dialect);
-       dialectCO->setEnabled(dialectCO->count() > 1);
+       dialectCO->setEnabled(dialectCO->count() > 1
+                             && !buffer().params().use_minted);
 }