Cosmetic improvements to tabular dialog.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39156 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2011-06-20 21:08:51 +00:00
parent f1de5be99b
commit f14970eacd

View File

@ -218,9 +218,12 @@ void GuiTabular::checkEnabled()
bool const is_tabular_star = !tabularWidthED->text().isEmpty(); bool const is_tabular_star = !tabularWidthED->text().isEmpty();
rotateTabularCB->setDisabled(is_tabular_star); rotateTabularCB->setDisabled(is_tabular_star);
vAlignCO->setEnabled(!multirowCB->isChecked() bool const enable_valign =
!multirowCB->isChecked()
&& !widgetsToLength(columnWidthED, columnWidthUnitLC).empty() && !widgetsToLength(columnWidthED, columnWidthUnitLC).empty()
&& specialAlignmentED->text().isEmpty()); && specialAlignmentED->text().isEmpty();
vAlignCO->setEnabled(enable_valign);
vAlignLA->setEnabled(enable_valign);
topspaceED->setEnabled(topspaceCO->currentIndex() == 2); topspaceED->setEnabled(topspaceCO->currentIndex() == 2);
topspaceED->setEnabled(topspaceCO->currentIndex() == 2); topspaceED->setEnabled(topspaceCO->currentIndex() == 2);
@ -287,8 +290,10 @@ void GuiTabular::checkEnabled()
multicolumnCB->setEnabled(funcEnabled(Tabular::MULTICOLUMN)); multicolumnCB->setEnabled(funcEnabled(Tabular::MULTICOLUMN));
multirowCB->setEnabled(funcEnabled(Tabular::MULTIROW)); multirowCB->setEnabled(funcEnabled(Tabular::MULTIROW));
multirowOffsetED->setEnabled(multirowCB->isChecked()); bool const enable_mr = multirowCB->isChecked();
multirowOffsetUnitLC->setEnabled(multirowCB->isChecked()); multirowOffsetLA->setEnabled(enable_mr);
multirowOffsetED->setEnabled(enable_mr);
multirowOffsetUnitLC->setEnabled(enable_mr);
changed(); changed();
} }