diff --git a/source/CHANGELOG.md b/source/CHANGELOG.md index 7924fff9..76c2099e 100644 --- a/source/CHANGELOG.md +++ b/source/CHANGELOG.md @@ -1,6 +1,12 @@ BlueM.Wave Release Notes ======================== +Version 2.4.4 +------------- +FIXED: +* Fixed issue with deleting series or editing series properties in the properties window, + this only affected series with extreme dates that cannot be entirely displayed in the chart #68 + Version 2.4.3 ------------- FIXED: diff --git a/source/Classes/TimeSeries.vb b/source/Classes/TimeSeries.vb index 2f897bea..fbb86e1b 100644 --- a/source/Classes/TimeSeries.vb +++ b/source/Classes/TimeSeries.vb @@ -465,8 +465,12 @@ Public Class TimeSeries ''' ''' Clones a time series ''' - Public Function Clone() As TimeSeries + ''' if True, the Id is preserved, otherwise a new unique Id is assigned (default) + Public Function Clone(Optional preserveId As Boolean = False) As TimeSeries Dim target As New TimeSeries(Me.Title) + If preserveId Then + target._id = Me.Id + End If target.Unit = Me.Unit target.Objekt = Me.Objekt target.Type = Me.Type diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb index 062ae426..561545ad 100644 --- a/source/Controllers/WaveController.vb +++ b/source/Controllers/WaveController.vb @@ -2124,9 +2124,10 @@ Friend Class WaveController ''' Die anzuzeigende Zeitreihe Private Sub SeriesAdded(ts As TimeSeries) - 'Remove nodes if necessary (#68) + 'Check for extreme dates not supported by TChart + 'and if necessary create a copy with removed nodes for display purposes (#68) If ts.StartDate < Constants.minOADate Then - ts = ts.Clone() + ts = ts.Clone(preserveId:=True) Dim t_too_early = New List(Of DateTime) For Each t As DateTime In ts.Dates If t < Constants.minOADate Then @@ -2141,7 +2142,7 @@ Friend Class WaveController Log.AddLogEntry(Log.levels.warning, $"Unable to display {t_too_early.Count} nodes between {t_too_early.First().ToString(Helpers.CurrentDateFormat)} and {t_too_early.Last().ToString(Helpers.CurrentDateFormat)}!") End If If ts.EndDate > Constants.maxOADate Then - ts = ts.Clone() + ts = ts.Clone(preserveId:=True) Dim t_too_late As New List(Of DateTime) For Each t As DateTime In ts.Dates.Reverse() If t > Constants.maxOADate Then diff --git a/source/My Project/AssemblyInfo.vb b/source/My Project/AssemblyInfo.vb index 7e10bb4e..b8056d17 100644 --- a/source/My Project/AssemblyInfo.vb +++ b/source/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' by using the '*' as shown below: ' - -' + +'