Closed Sadario closed 6 years ago
Seems to be a bug that was introduced somewhere between 2.1 and 2.3.1 (the two versions I have on my laptop).
Thanks for the bug report! I am currently looking into undo/redo functionality, which actually touches and refactors most of the related code, so I'm not 100% sure if I'm going to focus on this bug just yet. We'll see how far along the new features come before I take a closer look at this (though patches are always welcome if someone finds a fix) :)
pull request #1701 should fix this, there was no check for maxGroupFitted. added the check and it swaps instead of cloning. I wasn't sure what other items can have maxGroupFitted, but i think the check I added covers all use cases (??) tested for 5-10 minutes and couldn't get it to break but I didn't know which modules even use the maxGroupFitted attribute so I'm sure I missed coverage.
Bug Report
If trying to copy a module that has attribute "Max Modules Of This Group Allowed = 1", by holding ctrl and dragging the module to a new slot, Pyfa encounters an error.
Expected behavior:
Expecting Pyfa to inform me that the module can't be copied, or that the module is not copied at all.
Actual behavior:
Pyfa prints out a stacktrace.
Detailed steps to reproduce:
Any fitting, new or existing, add a module with attribute 'Max Modules...' set to 1/true (Damage Control, Small Ancillary (Remote) Armor Repairer, etc), then hold ctrl, and drag/drop on to new slot.
Fits involved in EFT format (Edit > To Clipboard > EFT):
[Velator, BugTest]
Damage Control II [Empty Low slot]
[Empty Med slot] [Empty Med slot]
Small Ancillary Remote Armor Repairer [Empty High slot]
Release or development git branch? Please note the release version or commit hash:
622a3004c51a017d604265bab3ce27885069d530
Operating system and version (eg: Windows 10, OS X 10.9, OS X 10.11, Ubuntu 16.10):
Windows 10
Other relevant information: