Bugfix for [#17748] "Copy and paste under window since rev 16769"
Now actually copies to the clipboard on copy/cut when editing UI fields.
This commit is contained in:
@@ -1843,13 +1843,14 @@ static int ui_do_but_TEX(uiBut *but)
|
||||
}
|
||||
/* cut & copy */
|
||||
else if ( (dev==XKEY) || (dev==CKEY) ) {
|
||||
/* copy the contents to the copypaste buffer */
|
||||
/* copy the contents to the clipboard */
|
||||
for(x= but->selsta; x <= but->selend; x++) {
|
||||
if (x==but->selend)
|
||||
buf[x] = '\0';
|
||||
else
|
||||
buf[(x - but->selsta)] = str[x];
|
||||
}
|
||||
putClipboard(buf, 0);
|
||||
|
||||
/* for cut only, delete the selection afterwards */
|
||||
if (dev==XKEY) {
|
||||
|
||||
Reference in New Issue
Block a user