null54 Posted June 8, 2020 Share Posted June 8, 2020 I ran into a strange issue with the LinkValuesBasedOnBooleanRule when updating my Image Tiling FileType plugin. The values remain linked even when the checkbox is unchecked. My code appears to match the samples for this rule, so I am not sure if this is a bug in my code or Paint.NET. OnCreateSavePropertyCollection: Spoiler public override PropertyCollection OnCreateSavePropertyCollection() { const int DefaultTileSize = 256; const int MinTileSize = 8; const int MaxTileSize = 2048; List<Property> props = new List<Property> { new Int32Property(PropertyNames.TileHeight, DefaultTileSize, MinTileSize, MaxTileSize), new Int32Property(PropertyNames.TileWidth, DefaultTileSize, MinTileSize, MaxTileSize), new BooleanProperty(PropertyNames.SquareTiles, true) }; List<PropertyCollectionRule> rules = new List<PropertyCollectionRule> { new LinkValuesBasedOnBooleanRule<int, Int32Property>( new object[] { PropertyNames.TileHeight, PropertyNames.TileWidth }, PropertyNames.SquareTiles, false) }; return new PropertyCollection(props, rules); } Here is the compiled DLL. TileImageFileType.zip Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
Rick Brewster Posted June 8, 2020 Share Posted June 8, 2020 Okay I've filed an issue over on GitHub, I'll look into it for 4.2.13 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 13, 2020 Share Posted August 13, 2020 Okay I've fixed this -- it'll be in the next release! 1 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.