-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add data info line to SVG export dialog. #1192
base: master
Are you sure you want to change the base?
Conversation
b91f823
to
b3d4f0c
Compare
…ation and change data info to use new diplayitem calibration work
…e line to avoid running off of dialog
9c5f92c
to
758d8c3
Compare
converter = CalibratedSizeFloatToStringConverter(self, index, uniform=False) | ||
calibrated_dimensional_calibration_str_list.append(converter.convert_calibrated_value_to_str(display_data_shape[index])) | ||
converter = CalibratedSizeFloatToStringConverter(self, index, uniform=True) | ||
calibrated_value = converter.convert(1) | ||
if calibrated_value is not None: | ||
calibrated_dimensional_calibration_str_list.append(calibrated_value) #passing in 1 as the converter expects fractional units |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this being changed? This belongs in a separate PR with an explanation.
Also, the format of the comment would need to follow Python conventions with two spaces before the '#' and a space after the '#'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See related PR #1214
Repeating some info from chat here: There is a problem if you calibrate an image in the x-dimension but not the y-dimension. This is a problem with the code we wrote the other day, so I'll provide a PR for it separately. PR here #1214. The display of information needs to be improved. We tend not to use colons so maybe the first line could be "Data shape (pixels)" and the 2nd line "Shape (calibrated units)" And maybe to keep things uniform, the first line should have "Title" label. Maybe put title, data shape, and calibrated shape (if displayed) into a grid where the labels are on the left and the values are on the right but the right column is left justified, basically like the inspector info section (like this layout above, with labels on the left, values on the right) The overall Export SVG window should be wider - try 480px. Then don't wrap the title field. When using "\n" for formatting, make two text canvas items instead. "\n" isn't well defined in UI's. After everything is in a table (use the same table layout mechanism used for width/height), you should also remove the colons from width/height/units. Finally, the code itself in this PR is not following standard formatting. Using PyCharm, you should select the blocks of code that you're editing (but not anything else), for example lines 286-287 in the PR, and then choose Code > Reformat Code to make it look nice. It will add spaces around the + operators You should more or less do this on all code that has been changed in the PR, but nothing more (no spurious white space changes). Updated the SVG-1 and added an SVG-2 test for you test with. |
No description provided.