col_type const j = cellColumn(cell);
column_info[j].p_width = width;
+ // reset the vertical alignment to top if the fixed with
+ // is removed or zero because only fixed width columns can
+ // have a vertical alignment
+ if (column_info[j].p_width.zero())
+ column_info[j].valignment = LYX_VALIGN_TOP;
for (row_type i = 0; i < row_info.size(); ++i) {
idx_type const cell = cellIndex(i, j);
// because of multicolumns
case Tabular::M_VALIGN_TOP:
flag = false;
case Tabular::VALIGN_TOP:
+ status.setEnabled(!tabular.getPWidth(cur.idx()).zero());
status.setOnOff(
tabular.getVAlignment(cur.idx(), flag) == Tabular::LYX_VALIGN_TOP);
break;
case Tabular::M_VALIGN_BOTTOM:
flag = false;
case Tabular::VALIGN_BOTTOM:
+ status.setEnabled(!tabular.getPWidth(cur.idx()).zero());
status.setOnOff(
tabular.getVAlignment(cur.idx(), flag) == Tabular::LYX_VALIGN_BOTTOM);
break;
case Tabular::M_VALIGN_MIDDLE:
flag = false;
case Tabular::VALIGN_MIDDLE:
+ status.setEnabled(!tabular.getPWidth(cur.idx()).zero());
status.setOnOff(
tabular.getVAlignment(cur.idx(), flag) == Tabular::LYX_VALIGN_MIDDLE);
break;