Skip to content

Commit

Permalink
minor fixes for continuous schemes < 0
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasbaur committed Mar 4, 2019
1 parent 226d906 commit d21c207
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
12 changes: 8 additions & 4 deletions App/MainWindow.xaml.cs
Expand Up @@ -111,12 +111,16 @@ private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs
{
e.Cancel = true;
}

var dir = new DirectoryInfo(Path.GetDirectoryName(Properties.Settings.Default.CMLTempTrainerPath));
foreach (var file in dir.EnumerateFiles(Path.GetFileName(Properties.Settings.Default.CMLTempTrainerPath) + "latestcmlmodel*"))
try
{
file.Delete();
var dir = new DirectoryInfo(Path.GetDirectoryName(Properties.Settings.Default.CMLTempTrainerPath));
foreach (var file in dir.EnumerateFiles(Path.GetFileName(Properties.Settings.Default.CMLTempTrainerPath) + "latestcmlmodel*"))
{
file.Delete();
}
}
catch { }


}
}
Expand Down
7 changes: 4 additions & 3 deletions Controls/Annotation/AnnoTier.cs
Expand Up @@ -329,7 +329,7 @@ public AnnoTier(AnnoList anno)

if (!init)
{
yPos = yPos = (numberOfLevels - ((int)(numberOfLevels / 2) * fac)) * segmentHeight;
yPos = (numberOfLevels - ((int)(numberOfLevels / 2) * fac)) * segmentHeight;
init = true;
}

Expand Down Expand Up @@ -375,7 +375,8 @@ private void UdpateContinuousPosition()

double normal = 1.0 - (yPos / this.ActualHeight);
double normalized = (normal * range) + this.AnnoList.Scheme.MinScore;
if (normalized < 1.1102230246251565E-15) normalized = 0;
//TODO fix for very small numbers
if (normalized < 1.1102230246251565E-15 && normalized > -1.1102230246251565E-15) normalized = 0;

continuousTierEllipse.Height = this.ActualHeight / 10;
continuousTierEllipse.Width = continuousTierEllipse.Height;
Expand Down Expand Up @@ -416,7 +417,7 @@ public void continuousSegmentDown()

double step = fac * segmentHeight;
yPos = (yPos + step <= this.ActualHeight) ? yPos + step : yPos;
if (yPos + step <= this.ActualHeight) level--;
level--;
}

public void continuousSegmentToPosition(int position)
Expand Down
2 changes: 1 addition & 1 deletion Controls/MainHandler.cs
Expand Up @@ -16,7 +16,7 @@ public partial class MainHandler
{

//Config
public static string BuildVersion = "1.0.5.0";
public static string BuildVersion = "1.0.5.1";
public static MEDIABACKEND MediaBackend = MEDIABACKEND.MEDIAKIT;
public static bool ENABLE_PYTHON = Properties.Settings.Default.EnablePython;

Expand Down
Binary file modified bin/nova.exe
Binary file not shown.

0 comments on commit d21c207

Please sign in to comment.