gvSIG bugs #742

Exception when configuring printing with the units from MeasureExtension

Added by Jorge López Fernández almost 12 years ago. Updated over 10 years ago.

Status:Awaiting response% Done:

100%

Priority:Low
Assignee:Jorge López Fernández
Category:-
Target version:-
Severity: Add-on name:Unknown
gvSIG version:1.12.0 Add-on version:
gvSIG build:1402 Add-on build:
Operative System: Add-on resolve version:
Keywords: Add-on resolve build:
Has patch:No

Description

An ArrayIndexOutOfBoundsException is thrown when changing the units to Millas Náuticas or Decímetros while configuring a map for printing. This happens because the contents of the ComboBox are obtained from MapContext, which includes those measure units (added by MeasureExtension), whereas the units' equivalences and basic unit are stored in the Layout Attributes, which doesn't contain those. It'd be better to have everything in MapContext.

fixes_special_measure_units.patch Magnifier (5.82 KB) Jorge López Fernández, 06/18/2012 01:04 PM

History

#1 Updated by Jorge López Fernández almost 12 years ago

I think I have fixed it in the least intrusive way. Created a new method in MapContext for obtaining the units' cm equivalencies, which should be called every time we need them because it's the place that contains the updated ones. The public field CHANGE in Attributes is kept as a legacy in case other extensions use it, and its values are obtained from MapContext. The base units for the special measure units are obtained from the cm one, translating it to the proper unit.

#2 Updated by Álvaro Anguix over 10 years ago

  • Project changed from Application: gvSIG desktop to | gvSIG desktop 1
  • Category deleted (Application)

Also available in: Atom PDF