-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing a part's properties very fast causes copies of the part #1431
Comments
From irasc...@gmail.com on June 29, 2011 08:48:14 This issue opens up a can of worms. The problem is that when you use the mouse wheel to scroll through the combobox choices, each intermediary result triggers a "combo box changed" event, so when you move the mouse wheel very quickly all those events pile up, with unpredictable results. The optimal solution would be to change the combobox so that the signals didn't pile up. Additionally, it would be good to block new swaps while a swap is currently taking place. However, there are a bunch of different combobox classes used all over the place, so at least for the moment I have bottlenecked the problem at the other end: when a combo box changed event tied to the swap function occurs, I set a timer, and if another event comes along within that time, the timer is restarted (the earlier event being essentially discarded). Another approach would be to disable the mouse wheel for these widgets... Status: PartlyDone |
From irasc...@gmail.com on June 29, 2011 09:39:17 the base combobox class would subscribe to its own change events, using a timer as above, then only on timeout would it emit external change signals. All classes using current combo boxes would connect to this new set of signals instead of the original set. For extra credit, the base combo box class could detect whether the change was due to a mouse wheel event, and if not could emit events directly with no delay. Labels: Component-Code |
From irasc...@gmail.com on February 03, 2012 05:19:37 Issue 1820 has been merged into this issue. |
From irasc...@gmail.com on February 04, 2012 01:07:00 Labels: Milestone-0.7.1 |
From irasc...@gmail.com on February 04, 2012 13:24:11 r5839 . restored swaptimer. |
This is still an issue. I can observe this behaviour with transistors and potentiometers. |
@KjellMorgenstern , should we disable wheel events to change properties in the comboboxes? This issue looks that can be fixed by increasing the timer from 30 to 200 (with 100ms I was still getting duplicated parts). However, I think that updating properties unintentionally can happen when scrolling through the inspector pane. Thus, I am more inclined towards deactivating the wheel scrolling to change properties. Another solution would be to change the focus policy. So a combobox needs to be pressed in order to scroll with the wheel of the mouse. However, I tried that and it does not work (without adding other code) as when the property changes with the first wheel movement, the combobox looses focus again. |
This change fixes issue fritzing#1431. I am not sure that this is the right way of fixing this issue, but at least it will mitigate the issue. I would disable the change of the properties by scrolling, except that the property combobox had been selected. This will avoid the fact that you can unintentionally change properties of the part when scrolling through the inspector pane.
I think this has been fixed in 1.0.0 |
We disabled the wheel input on comboboxes in the inspector to avoid accidental changes. It was reliably reproducible when switching (by pressing a key or a mousewheel) parts slower than 30ms, but faster than 130ms. User would not often do this, but certainly this happened. So even if you trigger switching parts by other means, the switch will now happen more instant, and will not "forget" to delete the previous part. |
From andre.knoerig@gmail.com on April 21, 2011 06:18:59
What steps will reproduce the problem? 1. Place a part (e.g., a transistor)
2. Move your mouse cursor over a property that uses the swap mechanism (e.g. 'package').
3. Use the mousewheel, scrolling up and down fast. What is the expected output? What do you see instead? The part gets copied multiple times (on top of one another). It seems like the swapping mechanism isn't catching up.
This is nasty if you're doing that in a breadboard and not noticing the copy. It will be quite confusing.
Original issue: http://code.google.com/p/fritzing/issues/detail?id=1431
The text was updated successfully, but these errors were encountered: