Boundary thumb value changes upon cancel of edit color dialog

Issue #421 new
Robert Leach created an issue

NOTE: This issue may be resolved in an existing branch, but I'm not sure - we should test it after current PRs are merged.

USE CASE: WHAT DO YOU WANT TO DO?

Cancel editing a thumb without changing the thumb's value.

STEPS TO REPRODUCE AN ISSUE (OR TRIGGER A NEW FEATURE)

  1. Select view->colors
  2. Edit a boundary thumb & change it to -0.000000000345
  3. Click OK
  4. Edit the same boundary thumb
  5. Cancel

CURRENT BEHAVIOR

The value set in step 2 is displayed above the thumb as -3.45E-10, which runs off the right edge (this is problem 1). The value displayed in the text box in step 4 is 0.0 (this is problem 2). Canceling in step 5 results in the value displayed above the thumb changing to 0.0 (problem 3).

Before cancel:

beforecancel.png

After cancel:

aftercancel.png

Update:

In the current version of master, this issue still exists, but has changed slightly. Instead of displaying "-3.45E-10", it displays "-345E-12" (which I think is not desirable). It also has an extra dialog in the process...

Before cancel (note, the "0.0" is incorrectly pre-entered into the text box instead of the actual value that had been entered before):

before_cancel.png

After the first cancel:

replace_with_0_message.png

After canceling the above dialog:

after_cancel_cancel.png

This is better, in that you can cancel without affecting the existing settings, but the user should not be presented with a text-box pre-filled with a value different from that of the actual handle.

EXPECTED BEHAVIOR

Problem 1 & 2: If we're going to support scientific notation (which I think is reasonable in some cases), there should be enough space to display the largest numeric string (given 3 significant digits and a reasonable assumption that the exponent is no larger than 2 digits. Thus the largest string would be for example: -#.##E-##. That's 9 characters including signs. The value saved should be as exact as the user entered it, only it should be displayed as no more than 9 characters (as described). The value however that is displayed in the edit color dialog should be exact (and not scientific notation unless they entered it that way). Regardless of how we store it for out programmatic needs, the exact string the user types in should be saved and used for display purposes if it fits inside the 9 character limit.

Problem 3: Canceling a thumb edit should not change how the thumb value in the Colors dialog is displayed.

DEVELOPERS ONLY SECTION

SUGGESTED CHANGE (Pseudocode optional)

See expected behavior.

FILES AFFECTED (where the changes will be implemented) - developers only

unknown

LEVEL OF EFFORT - developers only

medium

COMMENTS

Comments (4)

  1. Log in to comment