[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.1/kdelibs/khtml
From: Maks Orlovich <maksim () kde ! org>
Date: 2008-10-06 20:17:00
Message-ID: 1223324220.806027.21655.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 868642 by orlovich:
Fix selection granularity not being initialized, at least when one initially started over a URL or image.
M +5 -0 editing/editing_p.h
M +5 -5 khtml_part.cpp
--- branches/KDE/4.1/kdelibs/khtml/editing/editing_p.h #868641:868642
@@ -53,6 +53,11 @@
bool m_keyReleasePending:1;
+ void beginSelectingText(DOM::Selection::ETextGranularity granularity) {
+ m_beganSelectingText = true;
+ m_selectionGranularity = granularity;
+ }
+
int m_xPosForVerticalArrowNavigation;
DOM::Editor *m_editor;
--- branches/KDE/4.1/kdelibs/khtml/khtml_part.cpp #868641:868642
@@ -6310,8 +6310,7 @@
}
if (selection.state() != Selection::CARET) {
- d->editor_context.m_selectionGranularity = Selection::WORD;
- d->editor_context.m_beganSelectingText = true;
+ d->editor_context.beginSelectingText(Selection::WORD);
}
setCaret(selection);
@@ -6335,8 +6334,7 @@
}
if (selection.state() != Selection::CARET) {
- d->editor_context.m_selectionGranularity = Selection::LINE;
- d->editor_context.m_beganSelectingText = true;
+ d->editor_context.beginSelectingText(Selection::LINE);
}
setCaret(selection);
@@ -6473,7 +6471,9 @@
Selection sel = caret();
sel.clearModifyBias();
if (!d->editor_context.m_beganSelectingText) {
- d->editor_context.m_beganSelectingText = true;
+ // We are beginning a selection during press-drag, when the original click
+ // wasn't appropriate for one. Make sure to set the granularity.
+ d->editor_context.beginSelectingText(Selection::CHARACTER);
sel.moveTo(pos);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic