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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mcvittal
Copy link

@mcvittal mcvittal commented Mar 4, 2019

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
Copy link
Member

marpet commented Mar 5, 2019

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
Copy link
Author

mcvittal commented Mar 5, 2019

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.

Copy link
Contributor

@TonioF TonioF left a comment

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.

@@ -417,9 +417,9 @@ private void updateTargetResolutionTargetWidthAndHeight() {

private void reactToSourceProductChange(Product product) {
if (product != null) {
resolutionSpinner.setValue(determineResolutionFromProduct(product));
resolutionSpinner.setValue(new Double(determineResolutionFromProduct(product)));
Copy link
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
Copy link

CLAassistant commented Jun 14, 2023

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
4 participants