From dbbf111ff06e026babcc7959cb94a0eeac3f7bd5 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 21 Nov 2011 14:28:41 +0000 Subject: [PATCH] 0000488: python console: buggy CallTips completion for members, starting with underscore ('_') git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5152 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d --- src/Gui/CallTips.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Gui/CallTips.cpp b/src/Gui/CallTips.cpp index 701d1c4f6f..fa76f61c0f 100644 --- a/src/Gui/CallTips.cpp +++ b/src/Gui/CallTips.cpp @@ -579,8 +579,9 @@ void CallTipsList::callTipItemActivated(QListWidgetItem *item) QString sel = cursor.selectedText(); if (!sel.isEmpty()) { // in case the cursor moved too far on the right side - QChar ch = sel.at(sel.count()-1); - if (!ch.isLetterOrNumber()) + const QChar underscore = QLatin1Char('_'); + const QChar ch = sel.at(sel.count()-1); + if (!ch.isLetterOrNumber() && ch != underscore) cursor.movePosition(QTextCursor::Left, QTextCursor::KeepAnchor); } cursor.insertText( text );