Fix preset option packing
This commit is contained in:
parent
81935c1050
commit
92328ae39c
1 changed files with 4 additions and 7 deletions
|
@ -7,6 +7,7 @@ using System.Configuration;
|
|||
using System.Drawing.Text;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
|
||||
namespace SpritePacker
|
||||
{
|
||||
|
@ -80,14 +81,10 @@ namespace SpritePacker
|
|||
{
|
||||
sortBySize();
|
||||
|
||||
List<Sprite> arrangedSprites = new List<Sprite>();
|
||||
foreach(Sprite cspr in sprites)
|
||||
List<Sprite> arrangedSprites = sprites.Where((Sprite spr) => spr.Placed).ToList();
|
||||
List<Sprite> spritesToPack = sprites.Where((Sprite spr) => !spr.Placed).ToList();
|
||||
foreach(Sprite cspr in spritesToPack)
|
||||
{
|
||||
if (cspr.Placed) {
|
||||
if(Verbose) Console.WriteLine($"Skipping placement of {cspr} as it has been preset");
|
||||
continue;
|
||||
}
|
||||
|
||||
if(Verbose) Console.WriteLine("Attempting to place {0}.", cspr);
|
||||
Point scanLines = Point.Empty;
|
||||
Point nextScanLines = new Point(int.MaxValue, int.MaxValue);
|
||||
|
|
Loading…
Reference in a new issue