Finally fixed the problem with the styling code: now selecting two sections of text

with a different color and change the font size works correctly.
Fixed a problem with mouse selection (a regression introduced when I fixed selection with keyboard).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9031 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2004-09-23 06:40:22 +00:00
parent 3b464cb0ce
commit 6be70a0fa1
2 changed files with 11 additions and 10 deletions
+6 -2
View File
@@ -471,7 +471,11 @@ BTextView::MouseDown(BPoint where)
}
}
}
// Unhighlights the selection if needed
if (fSelStart != fSelEnd)
Select(fSelStart, fSelEnd);
// get the system-wide click speed
bigtime_t clickSpeed = 0;
get_click_speed(&clickSpeed);
@@ -1585,7 +1589,6 @@ BTextView::SetFontAndColor(const BFont *inFont, uint32 inMode,
{
CALLED();
CancelInputMethod();
// hide the caret/unhilite the selection
if (fActive) {
if (fSelStart != fSelEnd)
@@ -1628,6 +1631,7 @@ BTextView::SetFontAndColor(int32 startOffset, int32 endOffset,
const rgb_color *inColor)
{
CALLED();
// hide the caret/unhilite the selection
if (fActive) {
if (startOffset != endOffset)