mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 12:20:59 +00:00
Update the typing attributes of a rich text view also if the selected
range has a non-zero length. Fixes a problem where, e.g., corrections from the spell panel could use wrong attributes. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29635 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7600520a7d
commit
e541ba3bc3
2 changed files with 18 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2010-02-15 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSTextView.m (-setSelectedRange:affinity:stillSelecting:):
|
||||||
|
Update the typing attributes of a rich text view also if the
|
||||||
|
selected range has a non-zero length. Fixes a problem where, e.g.,
|
||||||
|
corrections from the spell panel could use wrong attributes.
|
||||||
|
|
||||||
2010-02-14 Quentin Mathe <quentin.mathe@gmail.com>
|
2010-02-14 Quentin Mathe <quentin.mathe@gmail.com>
|
||||||
|
|
||||||
* Source/GSDragView.m (-_handleDrag:slidePoint:): Fixed to create a
|
* Source/GSDragView.m (-_handleDrag:slidePoint:): Fixed to create a
|
||||||
|
|
|
@ -3562,6 +3562,17 @@ afterString in order over charRange.
|
||||||
// Store the selected text in the selection pasteboard
|
// Store the selected text in the selection pasteboard
|
||||||
[self copySelection];
|
[self copySelection];
|
||||||
|
|
||||||
|
if (_tf.is_rich_text)
|
||||||
|
{
|
||||||
|
NSDictionary *dict;
|
||||||
|
|
||||||
|
/* always set the typing attributes to the attributes of the
|
||||||
|
first selected character */
|
||||||
|
dict = [_textStorage attributesAtIndex: charRange.location
|
||||||
|
effectiveRange: NULL];
|
||||||
|
[self setTypingAttributes: dict];
|
||||||
|
}
|
||||||
|
|
||||||
/* TODO: insertion point */
|
/* TODO: insertion point */
|
||||||
}
|
}
|
||||||
else /* no selection, only insertion point */
|
else /* no selection, only insertion point */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue