From 6e4494b9b7046a800daff4eecebd404a205697ad Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Thu, 5 Jun 2008 15:48:29 +0000 Subject: [PATCH] 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 --- src/frontends/qt4/GuiInfo.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt4/GuiInfo.cpp b/src/frontends/qt4/GuiInfo.cpp index d8a104dda4..00bb882a14 100644 --- a/src/frontends/qt4/GuiInfo.cpp +++ b/src/frontends/qt4/GuiInfo.cpp @@ -52,8 +52,12 @@ void GuiInfo::on_closePB_clicked() InsetInfo * GuiInfo::inset() const { - return static_cast(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(ins); } -- 2.39.2