MitjaNemec / PlaceFootprints

GNU General Public License v2.0
25 stars 5 forks source link

Update wxLB_MULTIPLE to wxLB_EXTENDED for wxListBoxes #9

Closed sintech closed 2 years ago

sintech commented 2 years ago

Adds support for multiple items selection using mouse and SHIFT/CTRL keys. Could be useful if one have multiple footprints but only wants to place some of them.

MitjaNemec commented 2 years ago

Which platform did you test this on? IIRC I had issues with wxLB_EXTENDED either on Windows or Linux a couple years ago. Anyhow I'll test this on Kubuntu 20.04 and Windows 10, and if there are no issues, I'll merge it. It will take a couple of days so that I get to test it, so please be patient.

I've already checked wxLB_MULTIPLE allows selection with shift and ctrl modifiers on Kubuntu and IIRC also on Windows (I am changing Replicate Layout plugin and I also have wxListBox there with wxLB_MULTIPLE modifier.)

MitjaNemec commented 2 years ago

Ok, I've got one testpoint. On Kubuntu there is no difference that I've noticed between wxLB_EXTENDED and wxLB_MULTIPLE. Both work the same and support ctrl and shift modifiers. I'll test on windows during the week

sintech commented 2 years ago

I tested it on latest Windows 10 and Kicad 6.0.5. And in my case wxLB_MULTIPLE did not allow to select multiple elements with mouse or shift/ctrl.

MitjaNemec commented 2 years ago

Hmm, there might be something weirder going on. I've also tested on Windows 10 with 6.0.5 and I had no issue (screencast enclosed). Do you use KiCad official build or are you using your own build? Which locale are you running on (open terminal with cmd and run systeminfo command).

My systeminfo output is

Host Name:                 ML
OS Name:                   Microsoft Windows 10 Enterprise
OS Version:                10.0.18363 N/A Build 18363
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
Registered Owner:          MitjaN
Registered Organization:
Product ID:                00329-00000-00003-AA663
Original Install Date:     21/01/2020, 13:43:19
System Boot Time:          13/05/2022, 07:56:51
System Manufacturer:       LENOVO
System Model:              10SGS02E00
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 158 Stepping 10 GenuineIntel ~3192 Mhz
BIOS Version:              LENOVO M1UKT47A, 14/08/2019
Windows Directory:         C:\WINDOWS
System Directory:          C:\WINDOWS\system32
Boot Device:               \Device\HarddiskVolume2
System Locale:             en-us;English (United States)
Input Locale:              sl;Slovenian
Time Zone:                 (UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague
Total Physical Memory:     32.603 MB
Available Physical Memory: 24.720 MB
Virtual Memory: Max Size:  37.467 MB
Virtual Memory: Available: 29.770 MB
Virtual Memory: In Use:    7.697 MB
Page File Location(s):     C:\pagefile.sys
Domain:                    LRTME
Logon Server:              \\ML

FNJPVj6dSE

sintech commented 2 years ago

I have just retested with wx.LB_MULTIPLE and it only allows you to select/deselect one item at a time. Clicking and dragging only activates first clicked item. Shift and Ctrl keys does not change anything. My systeminfo:

``` Host Name: SINTECH-PC OS Name: Майкрософт Windows 10 Pro OS Version: 10.0.19044 N/A Build 19044 OS Manufacturer: Microsoft Corporation OS Configuration: Standalone Workstation OS Build Type: Multiprocessor Free Registered Owner: sintech Registered Organization: Product ID: 00330-80000-00000-AA067 Original Install Date: 14.05.2020, 15:47:15 System Boot Time: 11.05.2022, 22:50:15 System Manufacturer: System manufacturer System Model: System Product Name System Type: x64-based PC Processor(s): 1 Processor(s) Installed. [01]: Intel64 Family 6 Model 58 Stepping 9 GenuineIntel ~3301 Mhz BIOS Version: American Megatrends Inc. 3904, 27.04.2013 Windows Directory: C:\WINDOWS System Directory: C:\WINDOWS\system32 Boot Device: \Device\HarddiskVolume1 System Locale: ru;Russian Input Locale: en-us;English (United States) Time Zone: (UTC+03:00) Moscow, St. Petersburg Total Physical Memory: 12 255 MB Available Physical Memory: 8 205 MB Virtual Memory: Max Size: 21 983 MB Virtual Memory: Available: 16 579 MB Virtual Memory: In Use: 5 404 MB ```

Stock KiCad 6.0.5:

``` Application: KiCad (64-bit) Version: (6.0.5), release build Libraries: wxWidgets 3.1.5 libcurl/7.82.0-DEV Schannel zlib/1.2.12 Platform: Windows 10 (build 19044), 64-bit edition, 64 bit, Little endian, wxMSW Build Info: Date: May 3 2022 00:36:16 wxWidgets: 3.1.5 (wchar_t,wx containers) Boost: 1.79.0 OCC: 7.6.0 Curl: 7.82.0-DEV ngspice: 36 Compiler: Visual C++ 1929 without C++ ABI ```

Thank you for this great plugin, it helped me a lot.

MitjaNemec commented 2 years ago

OK, I've tested the changes on Win10 and Kubuntu 20.04 and it works the same. I'll not even try to figure out why we have different experiences, so I'll merge this pull request. But if I get any negative feedback, I might revert this