mirror of
https://github.com/meteoinfo/MeteoInfo.git
synced 2025-12-08 20:36:05 +00:00
bugfix of setPoint function in PointZShape class
This commit is contained in:
parent
7c87de22d4
commit
f620d56f6b
@ -67,7 +67,7 @@ import java.util.zip.ZipInputStream;
|
||||
public static String getVersion(){
|
||||
String version = GlobalUtil.class.getPackage().getImplementationVersion();
|
||||
if (version == null || version.equals("")) {
|
||||
version = "3.8-beta2";
|
||||
version = "3.8-beta3";
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ public class PointShape extends Shape implements Cloneable{
|
||||
* Constructor
|
||||
*/
|
||||
public PointShape(){
|
||||
|
||||
this(new PointD());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -91,7 +91,8 @@ public class PointShape extends Shape implements Cloneable{
|
||||
* @param point Point
|
||||
*/
|
||||
public void setPoint(PointD point) {
|
||||
((List<PointD>) this.points).set(0, point);
|
||||
this.points = new ArrayList<>();
|
||||
((List<PointD>) this.points).add(point);
|
||||
updateExtent();
|
||||
}
|
||||
|
||||
|
||||
@ -43,12 +43,10 @@ public class PointZShape extends PointShape {
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param pointZ The PointZ object
|
||||
* @param point The PointD or PointZ object
|
||||
*/
|
||||
public PointZShape(PointZ pointZ) {
|
||||
this.points = new ArrayList<PointZ>();
|
||||
((List<PointZ>) this.points).add(pointZ);
|
||||
this.updateExtent();
|
||||
public PointZShape(PointD point) {
|
||||
setPoint(point);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -76,12 +74,20 @@ public class PointZShape extends PointShape {
|
||||
*/
|
||||
@Override
|
||||
public void setPoint(PointD point) {
|
||||
PointZ p = (PointZ) this.getPoint();
|
||||
PointZ p;
|
||||
if (this.points == null) {
|
||||
p = new PointZ();
|
||||
this.points = new ArrayList<>();
|
||||
((List<PointZ>)this.points).add(p);
|
||||
} else {
|
||||
p = (PointZ) this.getPoint();
|
||||
}
|
||||
p.X = point.X;
|
||||
p.Y = point.Y;
|
||||
if (point instanceof PointZ){
|
||||
p.Z = ((PointZ) point).Z;
|
||||
}
|
||||
|
||||
this.updateExtent();
|
||||
}
|
||||
|
||||
|
||||
@ -1,30 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<MeteoInfo File="milconfig.xml" Type="configurefile">
|
||||
<Path OpenPath="D:\Working\MIScript\Jython\mis\plot_types\funny">
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map\topology"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\meteo\calc"/>
|
||||
<Path OpenPath="D:\Working\MIScript\Jython\mis\plot_types\scatter">
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\meteo\wrf"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\meteo"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map\webmap"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\scatter"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\bar"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\slice"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\animation"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\funny"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\scatter"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\micaps"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\scatter"/>
|
||||
</Path>
|
||||
<File>
|
||||
<OpenedFiles>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\funny\bindundun.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\funny\xuerongrong.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\scatter\scatter3_1.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\io\micaps\mdfs_9.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\scatter\scatterm_2.py"/>
|
||||
</OpenedFiles>
|
||||
<RecentFiles>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\funny\bindundun.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\funny\xuerongrong.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\scatter\scatter3_1.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\io\micaps\mdfs_9.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\scatter\scatterm_2.py"/>
|
||||
</RecentFiles>
|
||||
</File>
|
||||
<Font>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user