labelbottomsep = 0.0;
parsep = 0;
align = LYX_ALIGN_BLOCK;
- alignpossible = LYX_ALIGN_BLOCK;
+ alignpossible = LYX_ALIGN_NONE | LYX_ALIGN_LAYOUT;
labeltype = LABEL_NO_LABEL;
endlabeltype = END_LABEL_NO_LABEL;
// Should or should not. That is the question.
};
lexrc.pushTable(alignTags, AT_LAYOUT);
- alignpossible = LYX_ALIGN_NONE;
+ alignpossible = LYX_ALIGN_NONE | LYX_ALIGN_LAYOUT;
int lineno = lexrc.getLineNo();
do {
int le = lexrc.lex();
}
+///
+inline
+LyXAlignment operator|(LyXAlignment la1, LyXAlignment la2) {
+ return static_cast<LyXAlignment>(static_cast<int>(la1) | static_cast<int>(la2));
+}
+
+
/// The different LaTeX-Types
enum LYX_LATEX_TYPES {
///
{
layout(new_layout);
LyXAlignment const oldAlign = params().align();
- // FIXME The first check is due to the fact that LYX_ALIGN_LAYOUT
- // is not required to be possible. A fix is on the way.
- if ((oldAlign != LYX_ALIGN_LAYOUT) &&
- !(oldAlign & layout()->alignpossible)) {
+
+ if (!(oldAlign & layout()->alignpossible)) {
frontend::Alert::warning(_("Alignment not permitted"),
_("The new layout does not permit the alignment previously used.\nSetting to default."));
params().align(LYX_ALIGN_LAYOUT);
params.spacing(spacing);
// does the layout allow the new alignment?
- //FIXME The reason we need the first check is because
- //LYX_ALIGN_LAYOUT isn't required to be possible. It
- //should be...and will be.
- if ((align == LYX_ALIGN_LAYOUT) ||
- (align & par.layout()->alignpossible))
- params.align(align);
+ if (align & par.layout()->alignpossible)
+ params.align(align);
par.setLabelWidthString(labelwidthstring);
params.noindent(noindent);
}
QPRadioMap::iterator it = radioMap.begin();
for (; it != radioMap.end(); ++it) {
LyXAlignment const align = it->first;
- //FIXME The reason we need the second check is because
- //LYX_ALIGN_LAYOUT isn't required to be possible. It
- //should be...and will be.
- it->second->setEnabled((align & alignPossible) ||
- (align == LYX_ALIGN_LAYOUT));
+ it->second->setEnabled(align & alignPossible);
}
docstring label = labelMap[LYX_ALIGN_LAYOUT];
if (!form_->controller().haveMulitParSelection())