Fix function disabling

This commit is contained in:
Juergen Spitzmueller 2012-11-20 15:48:59 +01:00
parent 6e54388f3b
commit 0f866762b2
2 changed files with 2 additions and 2 deletions

View File

@ -2527,6 +2527,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
Layout::LaTeXArgMap::const_iterator const lait =
args.find(convert<unsigned int>(arg));
if (lait != args.end()) {
enable = true;
InsetList::const_iterator it = cur.paragraph().insetList().begin();
InsetList::const_iterator end = cur.paragraph().insetList().end();
for (; it != end; ++it) {
@ -2540,7 +2541,6 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
}
}
}
enable = true;
} else
enable = false;
break;

View File

@ -344,6 +344,7 @@ bool InsetText::getStatus(Cursor & cur, FuncRequest const & cmd,
Layout::LaTeXArgMap::const_iterator const lait =
args.find(convert<unsigned int>(arg));
if (lait != args.end()) {
status.setEnabled(true);
InsetList::const_iterator it = cur.paragraph().insetList().begin();
InsetList::const_iterator end = cur.paragraph().insetList().end();
for (; it != end; ++it) {
@ -357,7 +358,6 @@ bool InsetText::getStatus(Cursor & cur, FuncRequest const & cmd,
}
}
}
status.setEnabled(true);
} else
status.setEnabled(false);
return true;