Skip to content

Commit

Permalink
bug fixes and tasks: #106, #109, #118
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrechka committed May 10, 2018
1 parent 534d6db commit 6f335bc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public static class SideCurveGeneratorFactory

public static ISideCurveGenerator GetGeneratorFor(Template.RightSideFormEnum rightSideForm) {
switch (rightSideForm) {
case Template.RightSideFormEnum.NotDefined: return straight;
case Template.RightSideFormEnum.Straight: return straight;
case Template.RightSideFormEnum.Steps: return steps;
case Template.RightSideFormEnum.Wave: return wave;
Expand Down
2 changes: 1 addition & 1 deletion Application/AnnotationPlane/Plane.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<media:GearsIcon />
</Button>
<Button Style="{StaticResource MetroButton}" Command="{Binding SaveImageCommand}" Height="50">
<media:ApertureIcon />
SVG
</Button>
<Button Style="{StaticResource MetroButton}" Command="{Binding SaveProjectCommand}" Height="50">
<media:SaveIcon />
Expand Down
1 change: 1 addition & 0 deletions Application/Intervals/BoreIntervalsVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ private void Initialize()
//activating the command that are set externally
ActivateIntervalImagesCommand.Execute(obj);
///now performing additional actions
MessageBox.Show("Геологи!!! Разметка фотографии начинается с верхнего фрагмента керна!", "Направление разметки фото", MessageBoxButton.OK, MessageBoxImage.Exclamation);
PhotoCalibratedBoreIntervalVM vm = obj as PhotoCalibratedBoreIntervalVM;
if (vm.ImagesCount == 0)
vm.AddNewImageCommand.Execute(null);
Expand Down
2 changes: 1 addition & 1 deletion Application/PhotoMarkup/AnnotatedPolygon.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public object Convert(object[] values, Type targetType, object parameter, Cultur

string lengthStr = "не задана";
if (length > 0.0)
lengthStr = string.Format("{0:#.00} м ({1:#.00} м - {2:#.00} м)", length, upperDepth,lowerDepth);
lengthStr = string.Format("{0:#.00} м ({1:#.00} м - {2:#.00} м)", length, lowerDepth, upperDepth);
return string.Format("№{0}: длина {1}", order, lengthStr);
}
else return null;
Expand Down
9 changes: 7 additions & 2 deletions Application/Reports/SVG/VisualColumnPainter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,14 @@ public override RenderedSvg RenderColumn()
for (int i = 0; i < layers.Length; i++)
{
VisualLayerPresentingVM lvm = layers[i];
if (lvm.BackgroundClass.CurrentClass != null && lvm.RightSideClass.CurrentClass != null && lvm.WidthClass.CurrentClass != null)
if (lvm.BackgroundClass.CurrentClass != null)
{
ISideCurveGenerator sideCurveGenerator = SideCurveGeneratorFactory.GetGeneratorFor(lvm.RightSideClass.CurrentClass.RightSideForm);
ISideCurveGenerator sideCurveGenerator = null;

if (lvm.RightSideClass.CurrentClass != null)
sideCurveGenerator = SideCurveGeneratorFactory.GetGeneratorFor(lvm.RightSideClass.CurrentClass.RightSideForm);
else
sideCurveGenerator = SideCurveGeneratorFactory.GetGeneratorFor(AnnotationPlane.Template.RightSideFormEnum.NotDefined);

SvgPatternServer sps = lvm.BackgroundClass.CurrentClass.BackgroundPattern;
sps.PatternContentUnits = SvgCoordinateUnits.ObjectBoundingBox;
Expand Down

0 comments on commit 6f335bc

Please sign in to comment.