fgmapping 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -1
- data/fgmapping.gemspec +1 -1
- data/lib/main-dlg-impl.rb +25 -20
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
v1.1.
|
1
|
+
v1.1.2 Bug fix: path handling fixed while pressing button repeatedly
|
2
|
+
|
3
|
+
v1.1.1 Bug fix: corrected altitude handling and HUD display
|
2
4
|
|
3
5
|
v1.1.0 included permanent storage of settings and selection between metric <-> imperial units
|
4
6
|
|
data/fgmapping.gemspec
CHANGED
data/lib/main-dlg-impl.rb
CHANGED
@@ -615,23 +615,27 @@ class MainDlg < Qt::Widget
|
|
615
615
|
@linepen.setColor(Qt::Color.new(track.color))
|
616
616
|
tck=nil
|
617
617
|
prev_node=false
|
618
|
-
track.nodes.
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
618
|
+
if !track.nodes.empty? then
|
619
|
+
track.nodes.each{|n|
|
620
|
+
if !prev_node then
|
621
|
+
tck=Qt::PainterPath.new(Qt::PointF.new((n.toxtile - mainnode_x) * 256, (n.toytile - mainnode_y) * 256))
|
622
|
+
else
|
623
|
+
tck.lineTo((n.toxtile - mainnode_x) * 256, (n.toytile - mainnode_y) * 256)
|
624
|
+
end
|
625
|
+
prev_node = true
|
626
|
+
}
|
627
|
+
track.path=TrackGraphicsPathItem.new(track)
|
628
|
+
track.path.setPath(tck)
|
629
|
+
track.path.setZValue(Z_VALUE_TRACK)
|
630
|
+
track.path.setPen(@linepen)
|
631
|
+
@scene.addItem(track.path)
|
632
|
+
end
|
631
633
|
end
|
632
634
|
}
|
633
635
|
if @w.pBrecordTrack.isChecked then
|
634
|
-
|
636
|
+
if !@mytracks[@mytrack_current].path.nil?
|
637
|
+
@tckpath=@mytracks[@mytrack_current].path.path
|
638
|
+
end
|
635
639
|
end
|
636
640
|
end
|
637
641
|
|
@@ -730,10 +734,6 @@ class MainDlg < Qt::Widget
|
|
730
734
|
@offset_x = @posnode.toxtile - mainnode_x
|
731
735
|
@offset_y = @posnode.toytile - mainnode_y
|
732
736
|
movemap(@node)
|
733
|
-
# @w.gVmap.centerOn(@offset_x*256,@offset_y*256)
|
734
|
-
# if !@hud.nil? then
|
735
|
-
# @hud.setPos(@w.gVmap.mapToScene(0,0))
|
736
|
-
# end
|
737
737
|
end
|
738
738
|
if @mytrack_current >= 0 and @w.pBrecordTrack.isChecked then
|
739
739
|
if @mytracks[@mytrack_current].nil? then
|
@@ -774,6 +774,11 @@ class MainDlg < Qt::Widget
|
|
774
774
|
if state
|
775
775
|
@mytrack_current += 1
|
776
776
|
@w.pBrecordTrack.text = "Recording Track #{@mytrack_current + 1}"
|
777
|
+
if @mytracks[@mytrack_current].nil? then
|
778
|
+
@mytracks[@mytrack_current] = Way.new(1, 'user', Time.now, nextcolor)
|
779
|
+
@linepen.setColor(Qt::Color.new(@mytracks[@mytrack_current].color))
|
780
|
+
@prev_track_node = false
|
781
|
+
end
|
777
782
|
else
|
778
783
|
@w.pBrecordTrack.text = "Record Track #{@mytrack_current + 2}"
|
779
784
|
end
|
@@ -981,8 +986,8 @@ class TrackGraphicsPathItem < Qt::GraphicsPathItem
|
|
981
986
|
|
982
987
|
if !hit.nil? and !@parent.nil? then
|
983
988
|
n=@parent.nodes[hit]
|
984
|
-
@nodeinfo_widget.w.lBlon.text="%.3f
|
985
|
-
@nodeinfo_widget.w.lBlat.text="%.3f
|
989
|
+
@nodeinfo_widget.w.lBlon.text="%.3f°" % n.lon
|
990
|
+
@nodeinfo_widget.w.lBlat.text="%.3f°" % n.lat
|
986
991
|
@nodeinfo_widget.w.lBalt.text="%.1fm" % n.elevation
|
987
992
|
@nodeinfo_widget.w.lBspeed.text="%.1fkm/h" % n.speed
|
988
993
|
pos = mapToScene(hoverEvent.pos)
|