mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-20 06:49:56 +00:00
Fix for bug 3401. Updated LFUN_CITATION_INSERT to new format.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17733 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
096b63170a
commit
6a383e5f9b
@ -1376,13 +1376,14 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
string opt1;
|
||||
if (contains(argument, "|")) {
|
||||
arg = token(argument, '|', 0);
|
||||
opt1 = '[' + token(argument, '|', 1) + ']';
|
||||
opt1 = token(argument, '|', 1);
|
||||
}
|
||||
std::ostringstream os;
|
||||
os << "citation LatexCommand\n"
|
||||
<< "\\cite" << opt1 << "{" << arg << "}\n"
|
||||
<< "\\end_inset";
|
||||
FuncRequest fr(LFUN_INSET_INSERT, os.str());
|
||||
InsetCommandParams icp("cite");
|
||||
icp["key"] = from_utf8(arg);
|
||||
if (!opt1.empty())
|
||||
icp["before"] = from_utf8(opt1);
|
||||
string icstr = InsetCommandMailer::params2string("citation", icp);
|
||||
FuncRequest fr(LFUN_INSET_INSERT, icstr);
|
||||
dispatch(fr);
|
||||
} else
|
||||
dispatch(FuncRequest(LFUN_DIALOG_SHOW, "citation"));
|
||||
|
Loading…
Reference in New Issue
Block a user