mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 05:01:49 +00:00
Hide custom_language_package if custom is not selected
Otherwise people might read it as if babel was automatically selected
This commit is contained in:
parent
6e7ef06dbc
commit
6fd2f7769f
@ -2463,6 +2463,12 @@ void PrefLanguage::on_uiLanguageCO_currentIndexChanged(int)
|
||||
|
||||
void PrefLanguage::on_languagePackageCO_currentIndexChanged(int i)
|
||||
{
|
||||
if (i == 2)
|
||||
languagePackageED->setText(save_langpack_);
|
||||
else if (!languagePackageED->text().isEmpty()) {
|
||||
save_langpack_ = languagePackageED->text();
|
||||
languagePackageED->clear();
|
||||
}
|
||||
languagePackageED->setEnabled(i == 2);
|
||||
}
|
||||
|
||||
@ -2505,8 +2511,14 @@ void PrefLanguage::updateRC(LyXRC const & rc)
|
||||
explicitDocLangBeginCB->setChecked(!rc.language_auto_begin);
|
||||
explicitDocLangEndCB->setChecked(!rc.language_auto_end);
|
||||
languagePackageCO->setCurrentIndex(rc.language_package_selection);
|
||||
if (languagePackageCO->currentIndex() == 2) {
|
||||
languagePackageED->setText(toqstr(rc.language_custom_package));
|
||||
languagePackageED->setEnabled(languagePackageCO->currentIndex() == 2);
|
||||
languagePackageED->setEnabled(true);
|
||||
} else {
|
||||
languagePackageED->clear();
|
||||
save_langpack_ = toqstr(rc.language_custom_package);
|
||||
languagePackageED->setEnabled(false);
|
||||
}
|
||||
globalCB->setChecked(rc.language_global_options);
|
||||
startCommandED->setText(toqstr(rc.language_command_begin));
|
||||
endCommandED->setText(toqstr(rc.language_command_end));
|
||||
|
@ -408,6 +408,9 @@ public:
|
||||
private Q_SLOTS:
|
||||
void on_uiLanguageCO_currentIndexChanged(int);
|
||||
void on_languagePackageCO_currentIndexChanged(int);
|
||||
private:
|
||||
///
|
||||
QString save_langpack_;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user