summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@nokia.com>2010-08-13 17:20:33 +0200
committerThomas Hartmann <Thomas.Hartmann@nokia.com>2010-08-13 17:22:23 +0200
commitd7956ad2e0412f4de0acdbedb6c7a538f3791f93 (patch)
tree7f3ce1778fbd7bb4263bea17db4177f2eff2a3d2 /src
parent8a86265c748f83c7496e595a66ec7dd946b4e786 (diff)
downloadqt-creator-d7956ad2e0412f4de0acdbedb6c7a538f3791f93.tar.gz
QmlJSEditor: bugfix
We have to check for m_oldCursorPosition != -1 to avoid calling apply() in the case of a TextMarker update. Otherwise the QuickToolBar misbehaves. I also removed the comment.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/qmljseditor/qmljseditor.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/qmljseditor/qmljseditor.cpp b/src/plugins/qmljseditor/qmljseditor.cpp
index 6377fe226d..d4e6fd9e1a 100644
--- a/src/plugins/qmljseditor/qmljseditor.cpp
+++ b/src/plugins/qmljseditor/qmljseditor.cpp
@@ -958,14 +958,13 @@ void QmlJSTextEditor::updateCursorPositionNow()
document()->revision() == semanticInfo().document->editorRevision()) {
Node *oldNode = m_semanticInfo.declaringMemberNoProperties(m_oldCursorPosition);
Node *newNode = m_semanticInfo.declaringMemberNoProperties(position());
- if (oldNode != newNode)
+ if (oldNode != newNode && m_oldCursorPosition != -1)
m_contextPane->apply(editableInterface(), m_semanticInfo.document, m_semanticInfo.snapshot, newNode, false);
if (oldNode != newNode &&
m_contextPane->isAvailable(editableInterface(), m_semanticInfo.document, m_semanticInfo.snapshot, newNode) &&
!m_contextPane->widget()->isVisible()) {
QList<TextEditor::Internal::RefactorMarker> markers;
if (UiObjectMember *m = newNode->uiObjectMemberCast()) {
- //const int start = m->firstSourceLocation().begin(); ### we consider moving the icon to the front
for (UiQualifiedId *q = qualifiedTypeNameId(m); q; q = q->next) {
if (! q->next) {
const int end = q->identifierToken.end();