int const nSpace = sizeof(space_info)/sizeof(SpaceInfo);
int const defaultSpace = 4;
-} // anon namespace
+} // namespace
InsetMathSpace::InsetMathSpace()
: space_(defaultSpace)
ss << si.width;
l = ss.str() + "px";
}
-
+
ms << "<mspace";
if (!l.empty())
ms << " width=\"" << from_ascii(l) << "\"";
ms << " />";
}
-
+
void InsetMathSpace::htmlize(HtmlStream & ms) const
{
SpaceInfo const & si = space_info[space_];
case InsetSpaceParams::CUSTOM:
case InsetSpaceParams::CUSTOM_PROTECTED: {
string l = length_.asHTMLString();
- ms << MTag("span", "width='" + l + "'")
+ ms << MTag("span", "width='" + l + "'")
<< from_ascii(" ") << ETag("span");
break;
}
}
}
-
+
void InsetMathSpace::normalize(NormalStream & os) const
{
os << "[space " << int(space_) << "] ";
case LFUN_INSET_MODIFY:
case LFUN_INSET_DIALOG_UPDATE:
case LFUN_MOUSE_RELEASE:
- case LFUN_MOUSE_PRESS:
- case LFUN_MOUSE_MOTION:
status.setEnabled(true);
return true;
default:
break;
case LFUN_MOUSE_RELEASE:
- if (cmd.button() == mouse_button::button1) {
+ if (cmd.button() == mouse_button::button1 && !cur.selection()) {
showInsetDialog(&cur.bv());
break;
}
cur.undispatched();
break;
- case LFUN_MOUSE_PRESS:
- case LFUN_MOUSE_MOTION:
- // eat other mouse commands
- break;
-
default:
InsetMath::doDispatch(cur, cmd);
break;