break;
}
case LFUN_MATH_VALIGN:
- if (mathcursor && mathcursor->formula()->getType() != LM_OT_SIMPLE) {
+ if (mathcursor && mathcursor->formula()->hullType() != "simple") {
char align = mathcursor->valign();
if (align == '\0') {
disable = true;
break;
case LFUN_MATH_HALIGN:
- if (mathcursor && mathcursor->formula()->getType() != LM_OT_SIMPLE) {
+ if (mathcursor && mathcursor->formula()->hullType() != "simple") {
char align = mathcursor->halign();
if (align == '\0') {
disable = true;
break;
case LFUN_MATH_MUTATE:
- if (tli && (tli->lyxCode() == Inset::MATH_CODE)) {
- MathInsetTypes type = mathcursor->formula()->getType();
- if (argument == "inline") {
- flag.setOnOff(type == LM_OT_SIMPLE);
- } else if (argument == "display") {
- flag.setOnOff(type == LM_OT_EQUATION);
- } else if (argument == "eqnarray") {
- flag.setOnOff(type == LM_OT_EQNARRAY);
- } else if (argument == "align") {
- flag.setOnOff(type == LM_OT_ALIGN);
- } else if (argument == "alignat") {
- flag.setOnOff(type == LM_OT_ALIGNAT);
- } else if (argument == "xalignat") {
- flag.setOnOff(type == LM_OT_XALIGNAT);
- } else if (argument == "xxalignat") {
- flag.setOnOff(type == LM_OT_XXALIGNAT);
- } else if (argument == "none") {
- flag.setOnOff(type == LM_OT_NONE);
- } else {
- disable = true;
- }
- } else
+ if (tli && (tli->lyxCode() == Inset::MATH_CODE))
+ flag.setOnOff(mathcursor->formula()->hullType() == argument);
+ else
disable = true;
break;
case LFUN_MATH_COLUMN_INSERT:
case LFUN_MATH_COLUMN_DELETE:
disable = !mathcursor || !mathcursor->halign() ||
- mathcursor->formula()->getType() == LM_OT_SIMPLE;
+ mathcursor->formula()->hullType() == "simple";
break;
default:
owner->view()->buffer(bufferlist.loadLyXFile(s));
}
- // Set the cursor
owner->view()->setCursorFromRow(row);
- // Recenter screen
owner->view()->center();
+ // see BufferView_pimpl::center()
+ owner->view()->updateScrollbar();
}
break;
owner->view()->setState();
owner->showState();
- // Recenter screen
owner->view()->center();
+ // see BufferView_pimpl::center()
+ owner->view()->updateScrollbar();
}
break;
case LFUN_SEQUENCE:
{
// argument contains ';'-terminated commands
- while (argument.find(';') != string::npos) {
+ while (!argument.empty()) {
string first;
argument = split(argument, first, ';');
verboseDispatch(first, false);
lyxColorHandler->updateColor(lcolor.getFromLyXName(lyx_name));
if (graphicsbg_changed) {
+#ifdef WITH_WARNINGS
+#warning FIXME!! The graphics cache no longer has a changeDisplay method.
+#endif
+#if 0
grfx::GCache & gc = grfx::GCache::get();
gc.changeDisplay(true);
+#endif
}
owner->view()->repaint();