Skip to content

Casts values to double - Fix for ticket SNAP-1045#72

Open
mcvittal wants to merge 1 commit into
masterfrom
SNAP-1045
Open

Casts values to double - Fix for ticket SNAP-1045#72
mcvittal wants to merge 1 commit into
masterfrom
SNAP-1045

Conversation

@mcvittal

@mcvittal mcvittal commented Mar 4, 2019

Copy link
Copy Markdown

This change allows the Resampling dialog to now successfully open and resample imagery, casting values to Double.

@mcvittal mcvittal requested a review from TonioF March 4, 2019 18:52
@marpet

marpet commented Mar 5, 2019

Copy link
Copy Markdown
Member

Thanks for this. But this is only a small part of the complete fix.
In the dialog the spinner needs to be changed completely to handle floating point values or maybe replace the spinner at all by a number field. Also, the ResamplingOp needs to be changed to consider the floating point values for the resolution.

@mcvittal

mcvittal commented Mar 5, 2019

Copy link
Copy Markdown
Author

Ok. I should be able to implement the remainder of the changes needed this week and update this pull request with the new commits when I complete the necessary changes.

@TonioF TonioF left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ResamplingOp actually does not require many changes. Most work needs to be done here to adapt the spinner to support double values.

private void reactToSourceProductChange(Product product) {
if (product != null) {
resolutionSpinner.setValue(determineResolutionFromProduct(product));
resolutionSpinner.setValue(new Double(determineResolutionFromProduct(product)));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than creating a Double object here, make determineResolutionFromProduct return a double in the first place.

@CLAassistant

CLAassistant commented Jun 14, 2023

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants