mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 05:48:44 +00:00
fix slot bg image with multiple boxviews open
main window ignores box, and other windows don't clear. fix both for accurate indication of what slot was just used by the pkmeditor.
This commit is contained in:
parent
0ee36a655a
commit
6eb0cd17cb
1 changed files with 11 additions and 3 deletions
|
@ -305,10 +305,18 @@ namespace PKHeX.WinForms.Controls
|
|||
public void SetColor(int box, int slot, Image img)
|
||||
{
|
||||
// Update SubViews
|
||||
foreach (var boxview in Boxes)
|
||||
for (int b = 0; b < Boxes.Count; b++)
|
||||
{
|
||||
if (boxview.CurrentBox != box && boxview.SlotPictureBoxes.Count == boxview.BoxSlotCount)
|
||||
continue;
|
||||
var boxview = Boxes[b];
|
||||
if (boxview.CurrentBox != box)
|
||||
{
|
||||
if (b > 0 || slot < 30)
|
||||
{
|
||||
foreach (var s in boxview.SlotPictureBoxes)
|
||||
s.BackgroundImage = null;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
var slots = boxview.SlotPictureBoxes;
|
||||
for (int i = 0; i < slots.Count; i++)
|
||||
slots[i].BackgroundImage = slot == i ? img : null;
|
||||
|
|
Loading…
Add table
Reference in a new issue