Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit cd5f581

Browse files
committed
Allow flipping the portion currently selected with the Select paint tool
1 parent 063acb1 commit cd5f581

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

engine/src/cmdsc.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,6 +1331,18 @@ Parse_stat MCFlip::parse(MCScriptPoint &sp)
13311331
const LT *te;
13321332
initpoint(sp);
13331333

1334+
// Allow flipping the portion currently selected with the Select paint tool
1335+
// In this case an image is not specified, i.e. "flip vertical"
1336+
if (sp.next(type) == PS_NORMAL && sp.lookup(SP_FLIP, te) == PS_NORMAL)
1337+
{
1338+
direction = (Flip_dir)te->which;
1339+
return PS_NORMAL;
1340+
}
1341+
1342+
else
1343+
sp.backup();
1344+
1345+
13341346
// PM-2015-08-07: [[ Bug 1751 ]] Allow more flexible parsing: 'flip the selobj ..', 'flip last img..' etc
13351347

13361348
// Parse an arbitrary chunk. If it does not resolve as an image, a runtime error will occur in MCFlip::exec
@@ -1341,6 +1353,7 @@ Parse_stat MCFlip::parse(MCScriptPoint &sp)
13411353
return PS_ERROR;
13421354
}
13431355

1356+
13441357
if (sp.next(type) != PS_NORMAL || sp.lookup(SP_FLIP, te) != PS_NORMAL)
13451358
{
13461359
MCperror->add

0 commit comments

Comments
 (0)