From b7396b0a8a6f788c102dd66e0323ffbd60a6a1a4 Mon Sep 17 00:00:00 2001 From: dockes Date: Wed, 11 Jul 2007 10:05:27 +0000 Subject: [PATCH] dont create popup in irrelevant areas --- src/qtgui/reslist.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qtgui/reslist.cpp b/src/qtgui/reslist.cpp index c4fadc1f..afaa2e55 100644 --- a/src/qtgui/reslist.cpp +++ b/src/qtgui/reslist.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: reslist.cpp,v 1.29 2007-06-26 16:08:47 dockes Exp $ (C) 2005 J.F.Dockes"; +static char rcsid[] = "@(#$Id: reslist.cpp,v 1.30 2007-07-11 10:05:27 dockes Exp $ (C) 2005 J.F.Dockes"; #endif #include @@ -647,6 +647,8 @@ RCLPOPUP *ResList::createPopupMenu(const QPoint& pos) int para = paragraphAt(pos); clicked(para, 0); m_popDoc = docnumfromparnum(para); + if (m_popDoc < 0) + return 0; RCLPOPUP *popup = new RCLPOPUP(this); popup->insertItem(tr("&Preview"), this, SLOT(menuPreview())); popup->insertItem(tr("&Edit"), this, SLOT(menuEdit()));