[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/khtml
From: Maks Orlovich <maksim () kde ! org>
Date: 2008-10-06 20:18:49
Message-ID: 1223324329.091613.21765.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 868643 by orlovich:
Merged revision 868642:
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
--- trunk/KDE/kdelibs/khtml/editing/editing_p.h #868642:868643
@@ -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;
--- trunk/KDE/kdelibs/khtml/khtml_part.cpp #868642:868643
@@ -6304,8 +6304,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);
@@ -6329,8 +6328,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);
@@ -6469,7 +6467,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