InsetInfo::inset(): look also for next inset as InsetInfo cannot be entered with the cursor (yet).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25146 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-06-05 15:48:29 +00:00
parent 34739e59f7
commit 6e4494b9b7

View File

@ -52,8 +52,12 @@ void GuiInfo::on_closePB_clicked()
InsetInfo * GuiInfo::inset() const
{
return static_cast<InsetInfo *>(bufferview()->cursor().
innerInsetOfType(INFO_CODE));
Inset * ins = bufferview()->cursor().innerInsetOfType(INFO_CODE);
if (!ins)
ins = bufferview()->cursor().nextInset();
if (ins->lyxCode() != INFO_CODE)
return 0;
return static_cast<InsetInfo *>(ins);
}