mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Fix argument status detection for InsetText
This commit is contained in:
parent
eee9aa4042
commit
d7e0798ade
@ -341,12 +341,15 @@ bool InsetText::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
if (&buffer().inset() == this || !cur.paragraph().layout().latexargs().empty()
|
||||
|| !cur.paragraph().layout().itemargs().empty())
|
||||
return text_.getStatus(cur, cmd, status);
|
||||
|
||||
Layout::LaTeXArgMap args = getLayout().latexargs();
|
||||
Layout::LaTeXArgMap::const_iterator const lait = args.find(arg);
|
||||
if (lait != args.end()) {
|
||||
status.setEnabled(true);
|
||||
InsetList::const_iterator it = cur.paragraph().insetList().begin();
|
||||
InsetList::const_iterator end = cur.paragraph().insetList().end();
|
||||
ParagraphList::const_iterator pit = paragraphs().begin();
|
||||
for (; pit != paragraphs().end(); ++pit) {
|
||||
InsetList::const_iterator it = pit->insetList().begin();
|
||||
InsetList::const_iterator end = pit->insetList().end();
|
||||
for (; it != end; ++it) {
|
||||
if (it->inset->lyxCode() == ARG_CODE) {
|
||||
InsetArgument const * ins =
|
||||
@ -358,6 +361,7 @@ bool InsetText::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
status.setEnabled(false);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user