[LyX/master] BulletsModule: disable size widget with custom bullet (#12011)
Juergen Spitzmueller
spitz at lyx.org
Tue Feb 9 09:58:51 UTC 2021
commit 7cccfe5515cd454510604fdf92a09f007675d35f
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Tue Feb 9 11:01:45 2021 +0100
BulletsModule: disable size widget with custom bullet (#12011)
---
src/frontends/qt/BulletsModule.cpp | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/frontends/qt/BulletsModule.cpp b/src/frontends/qt/BulletsModule.cpp
index e640feb..fcd14e3 100644
--- a/src/frontends/qt/BulletsModule.cpp
+++ b/src/frontends/qt/BulletsModule.cpp
@@ -227,6 +227,8 @@ void BulletsModule::showLevel(int level)
if (bullets_[level].getFont() < 0) {
customCB->setCheckState(Qt::Checked);
customLE->setText(toqstr(bullets_[level].getText()));
+ bulletsizeCO->setEnabled(false);
+ sizeL->setEnabled(false);
} else {
customCB->setCheckState(Qt::Unchecked);
customLE->clear();
@@ -234,6 +236,8 @@ void BulletsModule::showLevel(int level)
selectItem(current_font_, current_char_, true);
bulletpaneCO->setCurrentIndex(current_font_);
bulletpaneSW->setCurrentIndex(current_font_);
+ bulletsizeCO->setEnabled(true);
+ sizeL->setEnabled(true);
}
bulletsizeCO->setCurrentIndex(bullets_[level].getSize() + 1);
}
@@ -262,6 +266,9 @@ void BulletsModule::bulletSelected(QListWidgetItem * item, QListWidgetItem *)
void BulletsModule::on_customCB_clicked(bool custom)
{
+ bulletsizeCO->setEnabled(!custom);
+ sizeL->setEnabled(!custom);
+
if (!custom) {
if (current_font_ < 0)
current_font_ = bulletpaneCO->currentIndex();
More information about the lyx-cvs
mailing list