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:
Ian Thompson
2008-10-04 21:04:16 +00:00
parent 7d77b58900
commit 04226f6f3f

View File

@@ -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) {