Skip to content
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

Weird interval QgsDoubleSpinbox behavior in graduated symbology with fixed interval #51687

Closed
2 tasks done
nicogodet opened this issue Feb 1, 2023 · 8 comments · Fixed by #51714
Closed
2 tasks done
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GUI/UX Related to QGIS application GUI or User Experience Symbology Related to vector layer symbology or renderers

Comments

@nicogodet
Copy link
Member

What is the bug or the crash?

image

Might be linked to wrong locale interpretation

Animation

Steps to reproduce the issue

  1. Define graduated symbology on vector layer
  2. Choose fixed interval
  3. Select everything
  4. Type what you want

Versions

3.28.3

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@nicogodet nicogodet added Bug Either a bug report, or a bug fix. Let's hope for the latter! GUI/UX Related to QGIS application GUI or User Experience Symbology Related to vector layer symbology or renderers labels Feb 1, 2023
@elpaso elpaso self-assigned this Feb 1, 2023
@elpaso
Copy link
Contributor

elpaso commented Feb 1, 2023

What's exactly the issue here?

The only thing I notice from your clip is 0.3,000 which is invalid and becomes 0.

@elpaso elpaso added the Feedback Waiting on the submitter for answers label Feb 1, 2023
@nicogodet
Copy link
Member Author

Okay so :

First try

I select all
image

Type 0.3
image
Here, remains ,000000 while on any other spinbox it's not the case
It leads to invalid value
image

Ex X, Y shift in symbology
image
image
image
image

Second try

After first try and invalid value, it is all selected in spinbox

image

Type 0.3
image
image
image
See auto conversion of . to ,

Select all and press del
image
shows default value as hint (?)

Start typing 0.3
image
default grayed out value is added after first 0
image
Ends in invalid value and default to previous valid valid which was 1,0
image

Third try

After second try and invalid value, it is all selected in spinbox

Type 2
image
image
OK

Fourth try

After third try, it is all selected in spinbox
Hit del

image

See cursor at beginning and grayed out default value
Type 5 then enter. I thought it would erase default value as it is grayed out
image
Nope 51
image

it all selected, type 32
image
image
Hit del
image
Hit 6
image

The behavior is confusing
Another screen capture with keyboard
Animation2

@nicogodet nicogodet removed the Feedback Waiting on the submitter for answers label Feb 2, 2023
@elpaso
Copy link
Contributor

elpaso commented Feb 2, 2023

@nicogodet thank you for the clarification, I misunderstood "select all" with select all the rules, I'll have a look.

@nicogodet
Copy link
Member Author

Side note if you work on this panel
imageimage

Precision spinbox won't expand if clear button is on

@elpaso
Copy link
Contributor

elpaso commented Feb 2, 2023

@nicogodet I debugged the issue: it seems to me that the problem is caused by the immediate call to the classification code every time the value in the input box changes, this runs in the main thread and blocks the GUI messing with the input processing in the input box.

I will provide a PR with a timer implementation (0.5 sec) which will trigger the classification only when 0.5 sec are passed from the last change in the input box.

This fixes (or at least mitigates) the issue for me but I'd like you to test it.

elpaso added a commit to elpaso/QGIS that referenced this issue Feb 2, 2023
Fix qgis#51687 by using a timer to detect end oftyping in the interval
spinbox.
@elpaso
Copy link
Contributor

elpaso commented Feb 2, 2023

Side note if you work on this panel imageimage

Precision spinbox won't expand if clear button is on

Can you please file a separate ticket?

@nicogodet
Copy link
Member Author

Thanks @elpaso
I will test when mingw build is completed

Can you please file a separate ticket?

OK

@nicogodet
Copy link
Member Author

It helps to avoid 0.3,000000

Is it not possible to have the behavior as for X or Y shift ?
Animation3

Which keep the user value until he press enter or spinbox lose focus ?

nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Feb 3, 2023
nyalldawson pushed a commit that referenced this issue Feb 23, 2023
Fix #51687 by using a timer to detect end oftyping in the interval
spinbox.
nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GUI/UX Related to QGIS application GUI or User Experience Symbology Related to vector layer symbology or renderers
Projects
None yet
2 participants