diff --git a/applications/fpvviewer/fpvectorialsrc/dxfvectorialreader.pas b/applications/fpvviewer/fpvectorialsrc/dxfvectorialreader.pas index c9acc55b5..1b730eca6 100644 --- a/applications/fpvviewer/fpvectorialsrc/dxfvectorialreader.pas +++ b/applications/fpvviewer/fpvectorialsrc/dxfvectorialreader.pas @@ -1056,7 +1056,6 @@ begin if not IsReadingPolyline then raise Exception.Create('[TvDXFVectorialReader.ReadENTITIES_VERTEX] Unexpected record: VERTEX before a POLYLINE'); curPoint := Length(Polyline); - Inc(curPoint); SetLength(Polyline, curPoint+1); for i := 0 to ATokens.Count - 1 do @@ -1094,7 +1093,7 @@ begin {$ifdef FPVECTORIALDEBUG_POLYLINE} Write(Format('POLYLINE %f,%f', [Polyline[0].X, Polyline[0].Y])); {$endif} - for i := 1 to Length(Polyline) do + for i := 1 to Length(Polyline)-1 do begin AData.AddLineToPath(Polyline[i].X, Polyline[i].Y); {$ifdef FPVECTORIALDEBUG_POLYLINE} diff --git a/applications/fpvviewer/fpvv_mainform.lfm b/applications/fpvviewer/fpvv_mainform.lfm index 5dfffbece..00ff4cfda 100644 --- a/applications/fpvviewer/fpvv_mainform.lfm +++ b/applications/fpvviewer/fpvv_mainform.lfm @@ -76,8 +76,8 @@ object frmFPVViewer: TfrmFPVViewer object pageViewer: TPage end object Page2: TPage - ClientWidth = 264 - ClientHeight = 312 + ClientWidth = 528 + ClientHeight = 624 object DXFTreeView: TTreeView Left = 8 Height = 313 diff --git a/applications/fpvviewer/fpvv_mainform.pas b/applications/fpvviewer/fpvv_mainform.pas index 615f1e284..9739af908 100644 --- a/applications/fpvviewer/fpvv_mainform.pas +++ b/applications/fpvviewer/fpvv_mainform.pas @@ -75,10 +75,12 @@ begin if Vec.Width * spinScale.Value > FPVVIEWER_MAX_IMAGE_SIZE then CanvasSize.X := FPVVIEWER_MAX_IMAGE_SIZE else if Vec.Width < FPVVIEWER_MIN_IMAGE_SIZE then CanvasSize.X := Drawer.Width else CanvasSize.X := Round(Vec.Width * spinScale.Value); + if CanvasSize.X < Drawer.Width then CanvasSize.X := Drawer.Width; if Vec.Height * spinScale.Value > FPVVIEWER_MAX_IMAGE_SIZE then CanvasSize.Y := FPVVIEWER_MAX_IMAGE_SIZE else if Vec.Height < FPVVIEWER_MIN_IMAGE_SIZE then CanvasSize.Y := Drawer.Height else CanvasSize.Y := Round(Vec.Height * spinScale.Value); + if CanvasSize.Y < Drawer.Height then CanvasSize.Y := Drawer.Height; Drawer.Drawing.Width := CanvasSize.X; Drawer.Drawing.Height := CanvasSize.Y;