Skip to content

Commit 9e6e942

Browse files
authored
Merge pull request livecode#4588 from peter-b/merge_develop-8.1_develop_20160929
Merge develop-8.1 into develop
2 parents e746a13 + 9042764 commit 9e6e942

26 files changed

+236
-154
lines changed

docs/dictionary/function/libUrlMultipartFormAddPart.lcdoc

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,33 @@ Platforms: desktop, server
2121
Security: network
2222

2323
Example:
24-
put empty into tForm
25-
put "dave" into tName
26-
put "hello" into tMessage
27-
if libURLMultipartFormData (tForm, "name", tName, "message", tMessage) \
28-
is not empty then
29-
##handle error and exit
30-
end if
31-
set the httpHeaders to line 1 of tForm
32-
delete line 1 of tForm
33-
put "<file>" & "C:/myfile.gif" into tFile
34-
put "image/gif" into tType
35-
put "binary" into tEnc
36-
if libURLMultipartFormAddPart(tForm,"file", tFile, tType, tEnc) \
37-
is empty then
38-
##handle error and exit
39-
else
40-
post tForm to url tURL
41-
set the httpHeaders to empty
42-
end if
24+
command UploadFileToServer pName, pMessage, pFilename
25+
put the httpHeaders into tOrigHeaders
26+
put empty into tForm
27+
put libURLMultipartFormData (tForm, "name", pName, "message", pMessage) into tError
28+
29+
if tError is empty then
30+
set the httpHeaders to line 1 of tForm
31+
delete line 1 of tForm
32+
put "<file>" & pFilename into tFile
33+
put "image/gif" into tType
34+
put "binary" into tEnc
35+
put libURLMultipartFormAddPart(tForm,"file", tFile, tType, tEnc) into tError
36+
end if
37+
38+
if tError is empty then
39+
post tForm to url tURL
40+
put the result into tError
41+
end if
42+
43+
set the httpHeaders to tOrigHeaders
44+
45+
if tError is not empty then
46+
return tError for error
47+
else
48+
return empty for value
49+
end if
50+
end UploadFileToServer
4351

4452
Parameters:
4553
value:

docs/notes/bugfix-15384.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix incorrect handling of a 204 response from a server.

docs/notes/bugfix-17247.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Remove selection artefacts when handles are drawn outside of parent group rect
1+
# Remove selection artefacts when handles are drawn outside of parent group rect

docs/notes/bugfix-17779.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix scrolling group drawing outside its bounds when acceleratedRendering used.

docs/notes/bugfix-18349.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix variable contents modified when used to set stack name

docs/notes/bugfix-18472.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# 'load url' is not properly cleaned up on socketError

docs/notes/bugfix-18488.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Error returned by hostnametoaddress was not being reported in libURL.

docs/notes/bugfix-18496.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix memory leak when using filter on unicode strings

engine/src/card.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3046,6 +3046,20 @@ void MCCard::drawselectedchildren(MCDC *dc)
30463046
while (tptr != objptrs);
30473047
}
30483048

3049+
void MCCard::dirtyselection(const MCRectangle &p_rect)
3050+
{
3051+
// redraw marquee rect
3052+
// selrect with 0 width or height will still draw a 1px line, so increase rect size to account for this.
3053+
layer_dirtyrect(MCU_reduce_rect(p_rect, -1));
3054+
3055+
// redraw selection handles
3056+
MCRectangle t_handles[8];
3057+
MCControl::sizerects(p_rect, t_handles);
3058+
3059+
for (uint32_t i = 0; i < 8; i++)
3060+
layer_dirtyrect(t_handles[i]);
3061+
}
3062+
30493063
bool MCCard::updatechildselectedrect(MCRectangle& x_rect)
30503064
{
30513065
bool t_updated;

engine/src/card.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,11 @@ class MCCard : public MCObject
217217
// IM-2013-09-13: [[ RefactorGraphics ]] render the card selection rect
218218
void drawselectionrect(MCContext *);
219219
void drawselectedchildren(MCDC *dc);
220+
221+
// IM-2016-09-26: [[ Bug 17247 ]] request redraw of the area occupied by
222+
// selection marquee + handles
223+
void dirtyselection(const MCRectangle &p_rect);
224+
220225
bool updatechildselectedrect(MCRectangle& x_rect);
221226

222227
Exec_stat openbackgrounds(bool p_is_preopen, MCCard *p_other);

0 commit comments

Comments
 (0)