mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Fix dragging battle team slot sprite refresh
Refresh the image if the team slot indication needs updating (true->false, false->true), else stay lazy and just set the image. Could just refresh the image regardless but muh negligible speed
This commit is contained in:
parent
82de3e5d12
commit
6ddcdee9cf
2 changed files with 12 additions and 2 deletions
|
@ -4121,7 +4121,12 @@ namespace PKHeX.WinForms
|
|||
pb.BackgroundImage = null;
|
||||
|
||||
if (DragInfo.SameBox && DragInfo.DestinationValid)
|
||||
SlotPictureBoxes[DragInfo.slotDestinationSlotNumber].Image = img;
|
||||
{
|
||||
if (SAV.getIsTeamSet(box, DragInfo.slotDestinationSlotNumber) ^ SAV.getIsTeamSet(box, DragInfo.slotSourceSlotNumber))
|
||||
getQuickFiller(SlotPictureBoxes[DragInfo.slotDestinationSlotNumber], SAV.getStoredSlot(DragInfo.slotDestinationOffset));
|
||||
else
|
||||
SlotPictureBoxes[DragInfo.slotDestinationSlotNumber].Image = img;
|
||||
}
|
||||
|
||||
if (result == DragDropEffects.Copy) // viewed in tabs, apply 'view' highlight
|
||||
getSlotColor(DragInfo.slotSourceSlotNumber, Resources.slotView);
|
||||
|
|
|
@ -203,7 +203,12 @@ namespace PKHeX.WinForms
|
|||
pb.BackgroundImage = null;
|
||||
|
||||
if (DragInfo.SameBox && DragInfo.DestinationValid)
|
||||
SlotPictureBoxes[DragInfo.slotDestinationSlotNumber].Image = img;
|
||||
{
|
||||
if (SAV.getIsTeamSet(box, DragInfo.slotDestinationSlotNumber) ^ SAV.getIsTeamSet(box, DragInfo.slotSourceSlotNumber))
|
||||
getQuickFiller(SlotPictureBoxes[DragInfo.slotDestinationSlotNumber], SAV.getStoredSlot(DragInfo.slotDestinationOffset));
|
||||
else
|
||||
SlotPictureBoxes[DragInfo.slotDestinationSlotNumber].Image = img;
|
||||
}
|
||||
}
|
||||
catch (Exception x)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue