ZELLMECHANIK-DRESDEN/ShapeOut2

Spin boxes for filters update too quickly and cause bad user experience

Closed this issue · 1 comments

ShapeOut 2.12.0
Windows 10

Problem:
When using a filter and entering minimum and maximum values for a specific feature, the spin box automatically fills in digits which is annoying if you haven't finished typing the desired value.

Example:
Feature: Deformation. You mark the whole number in the spinbox and then start typing "0.05": The moment you press the key for the first zero, the spinbox is updated and shows "0.000". And it seems that this is the maximum number of digits for that spinbox, so anything else that you type will be ignored.
One has to select the second zero after the decimal and then type "5" to get the desired value.

Could it be that some signal is emitted everytime the text changes, even if it's just one digit, and then checks are executed if the type/value is correct, causing the text that is displayed to be updated?

Yes you are right. The implementation is not optimal. The implementation of the spinboxes used is custom-made. It might make sense to look into pyqtgraph.SpinBox (which has delayed signals) https://pyqtgraph.readthedocs.io/en/latest/api_reference/widgets/spinbox.html