newpageCB, SLOT(setEnabled(bool)));
connect(longTabularCB, SIGNAL(toggled(bool)),
alignmentGB, SLOT(setEnabled(bool)));
+ // longtables cannot have a vertical alignment
+ connect(longTabularCB, SIGNAL(toggled(bool)),
+ TableAlignCB, SLOT(setDisabled(bool)));
connect(hAlignCB, SIGNAL(activated(int)),
this, SLOT(hAlign_changed(int)));
connect(vAlignCB, SIGNAL(activated(int)),
hAlignCB->setEnabled(true);
vAlignCB->setEnabled(!pwidth.zero());
- int tableValign = 0;
+ int tableValign = 1;
switch (tabular_.tabular_valignment) {
case Tabular::LYX_VALIGN_TOP:
tableValign = 0;
captionStatusCB->setChecked(false);
captionStatusCB->blockSignals(false);
return;
- }
+ } else
+ // longtables cannot have a vertical alignment
+ TableAlignCB->setCurrentIndex(Tabular::LYX_VALIGN_MIDDLE);
switch (tabular_.longtabular_alignment) {
case Tabular::LYX_LONGTABULAR_ALIGN_LEFT:
os << "<features"
<< write_attribute("rotate", rotate)
<< write_attribute("booktabs", use_booktabs)
- << write_attribute("islongtable", is_long_tabular);
- // longtables cannot be aligned vertically
- if (!is_long_tabular)
- os << write_attribute("tabularvalignment", tabular_valignment);
- if (is_long_tabular)
- os << write_attribute("longtabularalignment",
- longtabular_alignment);
- os << write_attribute("firstHeadTopDL", endfirsthead.topDL)
+ << write_attribute("islongtable", is_long_tabular)
+ << write_attribute("firstHeadTopDL", endfirsthead.topDL)
<< write_attribute("firstHeadBottomDL", endfirsthead.bottomDL)
<< write_attribute("firstHeadEmpty", endfirsthead.empty)
<< write_attribute("headTopDL", endhead.topDL)
<< write_attribute("footBottomDL", endfoot.bottomDL)
<< write_attribute("lastFootTopDL", endlastfoot.topDL)
<< write_attribute("lastFootBottomDL", endlastfoot.bottomDL)
- << write_attribute("lastFootEmpty", endlastfoot.empty)
- << ">\n";
+ << write_attribute("lastFootEmpty", endlastfoot.empty);
+ // longtables cannot be aligned vertically
+ if (!is_long_tabular)
+ os << write_attribute("tabularvalignment", tabular_valignment);
+ if (is_long_tabular)
+ os << write_attribute("longtabularalignment",
+ longtabular_alignment);
+ os << ">\n";
for (col_type j = 0; j < column_info.size(); ++j) {
os << "<column"
<< write_attribute("alignment", column_info[j].alignment)