if (!mathcursor)
return UNDISPATCHED;
- if (mathcursor->asHyperActiveInset()) {
- lyxerr << " uurr.... getting dificult now\n";
- return mathcursor->asHyperActiveInset()->localDispatch(bv, action, arg);
- }
-
RESULT result = DISPATCHED;
bool sel = false;
bool was_macro = mathcursor->inMacroMode();
#endif
-UpdatableInset * MathCursor::asHyperActiveInset() const
-{
- return par()->asHyperActiveInset();
-}
-
-
bool MathCursor::isInside(MathInset const * p) const
{
for (unsigned i = 0; i < Cursor_.size(); ++i)
bool MathCursor::openable(MathAtom const & t, bool sel) const
{
- if (t->isHyperActive())
- return true;
-
if (!t->isActive())
return false;
lastcode_ = LM_TC_MIN;
if (hasPrevAtom() && openable(prevAtom(), sel)) {
- if (prevAtom()->isHyperActive()) {
- lyxerr << "entering hyperactive inset\n";
- }
pushRight(prevAtom());
return true;
}
lastcode_ = LM_TC_MIN;
if (hasNextAtom() && openable(nextAtom(), sel)) {
- if (nextAtom()->isHyperActive()) {
- lyxerr << "entering hyperactive inset\n";
- int x, y;
- getPos(x, y);
- nextAtom()->edit(formula()->view(), x, y, 0);
- }
pushLeft(nextAtom());
return true;
}
pos() = min(pos(), size());
// remove empty scripts if possible
- for (pos_type i = 0; i < size(); ++i) {
- MathScriptInset * p = array().at(i)->asScriptInset();
- if (p) {
- p->removeEmptyScripts();
- if (p->empty())
- array().erase(i);
+ if (1) {
+ for (pos_type i = 0; i < size(); ++i) {
+ MathScriptInset * p = array().at(i)->asScriptInset();
+ if (p) {
+ p->removeEmptyScripts();
+ //if (p->empty())
+ // array().erase(i);
+ }
}
}
virtual MathSymbolInset const * asSymbolInset() const { return 0; }
virtual MathUnknownInset const * asUnknownInset() const { return 0; }
virtual MathXYMatrixInset const* asXYMatrixInset() const{ return 0; }
- virtual UpdatableInset * asHyperActiveInset() const { return 0; }
/// identifies things that can get scripts
virtual bool isScriptable() const { return false; }
/// thing that can be moved into
virtual bool isActive() const { return nargs() > 0; }
- /// identifies insets from the outer world
- virtual bool isHyperActive() const { return 0; }
/// is the a relational operator (used for splitting equations)
virtual bool isRelOp() const { return false; }