mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 06:41:12 +00:00
[writeSelectionToPasteboard:types:] corrected C binary operator
short cut logic that prevented us froam adding more than one string type to the pasteboard. Remember that || wont evaluate the second operand if the first is true. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11885 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ce22ed5135
commit
7f8dba0b2f
1 changed files with 6 additions and 6 deletions
|
@ -3477,20 +3477,20 @@ other than copy/paste or dragging. */
|
||||||
{
|
{
|
||||||
if ([type isEqualToString: NSStringPboardType])
|
if ([type isEqualToString: NSStringPboardType])
|
||||||
{
|
{
|
||||||
ret = ret || [pboard setString: [[self string] substringWithRange: _selected_range]
|
ret = [pboard setString: [[self string] substringWithRange: _selected_range]
|
||||||
forType: NSStringPboardType];
|
forType: NSStringPboardType] || ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([type isEqualToString: NSRTFPboardType])
|
if ([type isEqualToString: NSRTFPboardType])
|
||||||
{
|
{
|
||||||
ret = ret || [pboard setData: [self RTFFromRange: _selected_range]
|
ret = [pboard setData: [self RTFFromRange: _selected_range]
|
||||||
forType: NSRTFPboardType];
|
forType: NSRTFPboardType] || ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([type isEqualToString: NSRTFDPboardType])
|
if ([type isEqualToString: NSRTFDPboardType])
|
||||||
{
|
{
|
||||||
ret = ret || [pboard setData: [self RTFDFromRange: _selected_range]
|
ret = [pboard setData: [self RTFDFromRange: _selected_range]
|
||||||
forType: NSRTFDPboardType];
|
forType: NSRTFDPboardType] || ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([type isEqualToString: NSColorPboardType])
|
if ([type isEqualToString: NSColorPboardType])
|
||||||
|
|
Loading…
Reference in a new issue