Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2138 plot title and description not copied #2139

Merged
merged 2 commits into from
Mar 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/PKSim.Assets.Images/PKSim.Assets.Images.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OSPSuite.Assets" Version="11.0.145" />
<PackageReference Include="OSPSuite.Assets.Images" Version="11.0.145" />
<PackageReference Include="OSPSuite.Assets" Version="11.0.146" />
<PackageReference Include="OSPSuite.Assets.Images" Version="11.0.146" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/PKSim.Assets/PKSim.Assets.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OSPSuite.Assets" Version="11.0.145" />
<PackageReference Include="OSPSuite.Assets.Images" Version="11.0.145" />
<PackageReference Include="OSPSuite.Assets" Version="11.0.146" />
<PackageReference Include="OSPSuite.Assets.Images" Version="11.0.146" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/PKSim.BatchTool/PKSim.BatchTool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OSPSuite.Core" Version="11.0.145" />
<PackageReference Include="OSPSuite.Core" Version="11.0.146" />
<PackageReference Include="OSPSuite.DevExpress" Version="21.2.3" />
<PackageReference Include="OSPSuite.FuncParser" Version="4.0.0.52" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.SimModel" Version="4.0.0.47" GeneratePathProperty="true" />
Expand Down
2 changes: 1 addition & 1 deletion src/PKSim.CLI.Core/PKSim.CLI.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<ItemGroup>
<PackageReference Include="OSPSuite.Utility" Version="4.0.0.4" />
<PackageReference Include="OSPSuite.Core" Version="11.0.145" />
<PackageReference Include="OSPSuite.Core" Version="11.0.146" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/PKSim.CLI/PKSim.CLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.8.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.0" />
<PackageReference Include="OSPSuite.Core" Version="11.0.145" />
<PackageReference Include="OSPSuite.Presentation" Version="11.0.145" />
<PackageReference Include="OSPSuite.Core" Version="11.0.146" />
<PackageReference Include="OSPSuite.Presentation" Version="11.0.146" />
<PackageReference Include="OSPSuite.Utility" Version="4.0.0.4" />
<PackageReference Include="OSPSuite.FuncParser" Version="4.0.0.52" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.SimModel" Version="4.0.0.47" GeneratePathProperty="true" />
Expand Down
12 changes: 1 addition & 11 deletions src/PKSim.Core/Chart/IndividualSimulationComparison.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.Collections.Generic;
using OSPSuite.Core.Chart;
using OSPSuite.Core.Domain;
using OSPSuite.Core.Domain.Services;
using OSPSuite.Utility.Collections;
using PKSim.Core.Model;

Expand All @@ -11,7 +9,6 @@ public class IndividualSimulationComparison : ChartWithObservedData, ISimulation
{
private readonly ICache<string, IndividualSimulation> _allSimulations;
public bool IsLoaded { get; set; }
public string Icon { get; set; }

public IndividualSimulationComparison()
{
Expand All @@ -30,7 +27,7 @@ public void AddSimulation(IndividualSimulation simulation)
public IReadOnlyCollection<IndividualSimulation> AllSimulations => _allSimulations;

public IReadOnlyCollection<Simulation> AllBaseSimulations => _allSimulations;

public bool HasSimulation(IndividualSimulation simulation)
{
return _allSimulations.Contains(simulation.Id);
Expand All @@ -49,12 +46,5 @@ public void RemoveAllSimulations()
{
_allSimulations.Clear();
}

public void UpdatePropertiesFrom(IUpdatable source, ICloneManager cloneManager)
{
var originalChart = source as IndividualSimulationComparison;
if (originalChart == null) return;
UpdateFrom(originalChart);
}
}
}
16 changes: 0 additions & 16 deletions src/PKSim.Core/Chart/SummaryChart.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using System.Collections.Generic;
using OSPSuite.Core.Chart;
using OSPSuite.Core.Domain;
using OSPSuite.Core.Domain.Services;
using OSPSuite.Utility.Collections;
using OSPSuite.Utility.Visitor;
using PKSim.Core.Model;

namespace PKSim.Core.Chart
Expand All @@ -12,7 +9,6 @@ public class SummaryChart : ChartWithObservedData, ISimulationComparison<Individ
{
private readonly ICache<string, IndividualSimulation> _allSimulations;
public bool IsLoaded { get; set; }
public string Icon { get; set; }

public IReadOnlyCollection<IndividualSimulation> AllSimulations => _allSimulations;

Expand Down Expand Up @@ -50,17 +46,5 @@ public void RemoveAllSimulations()
{
_allSimulations.Clear();
}

public override void AcceptVisitor(IVisitor visitor)
{
visitor.Visit(this);
}

public void UpdatePropertiesFrom(IUpdatable source, ICloneManager cloneManager)
{
var originalChart = source as SummaryChart;
if (originalChart == null) return;
UpdateFrom(originalChart);
}
}
}
8 changes: 4 additions & 4 deletions src/PKSim.Core/PKSim.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="OSPSuite.Utility" Version="4.0.0.4" />
<PackageReference Include="OSPSuite.Core" Version="11.0.145" />
<PackageReference Include="OSPSuite.Assets" Version="11.0.145" />
<PackageReference Include="OSPSuite.Assets.Images" Version="11.0.145" />
<PackageReference Include="OSPSuite.Infrastructure.Import" Version="11.0.145" />
<PackageReference Include="OSPSuite.Core" Version="11.0.146" />
<PackageReference Include="OSPSuite.Assets" Version="11.0.146" />
<PackageReference Include="OSPSuite.Assets.Images" Version="11.0.146" />
<PackageReference Include="OSPSuite.Infrastructure.Import" Version="11.0.146" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
</ItemGroup>

Expand Down
16 changes: 8 additions & 8 deletions src/PKSim.Infrastructure/PKSim.Infrastructure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.0" />
<PackageReference Include="Newtonsoft.Json.Schema" Version="3.0.13" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="OSPSuite.Core" Version="11.0.145" />
<PackageReference Include="OSPSuite.Infrastructure" Version="11.0.145" />
<PackageReference Include="OSPSuite.Infrastructure.Castle" Version="11.0.145" />
<PackageReference Include="OSPSuite.Infrastructure.Export" Version="11.0.145" />
<PackageReference Include="OSPSuite.Infrastructure.Import" Version="11.0.145" />
<PackageReference Include="OSPSuite.Infrastructure.Reporting" Version="11.0.145" />
<PackageReference Include="OSPSuite.Infrastructure.Serialization" Version="11.0.145" />
<PackageReference Include="OSPSuite.Presentation.Serialization" Version="11.0.145" />
<PackageReference Include="OSPSuite.Core" Version="11.0.146" />
<PackageReference Include="OSPSuite.Infrastructure" Version="11.0.146" />
<PackageReference Include="OSPSuite.Infrastructure.Castle" Version="11.0.146" />
<PackageReference Include="OSPSuite.Infrastructure.Export" Version="11.0.146" />
<PackageReference Include="OSPSuite.Infrastructure.Import" Version="11.0.146" />
<PackageReference Include="OSPSuite.Infrastructure.Reporting" Version="11.0.146" />
<PackageReference Include="OSPSuite.Infrastructure.Serialization" Version="11.0.146" />
<PackageReference Include="OSPSuite.Presentation.Serialization" Version="11.0.146" />
<PackageReference Include="OSPSuite.Utility" Version="4.0.0.4" />
</ItemGroup>

Expand Down
9 changes: 7 additions & 2 deletions src/PKSim.Infrastructure/Services/ChartTemplatingTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class ChartTemplatingTask : OSPSuite.Presentation.Services.Charts.ChartTe
private readonly IQuantityPathToQuantityDisplayPathMapper _quantityDisplayPathMapper;
private readonly ICurveChartToCurveChartTemplateMapper _chartTemplateMapper;
private readonly IExecutionContext _executionContext;
private readonly ICloneManager _cloneManager;
private readonly IChartTask _chartTask;

public ChartTemplatingTask(IChartFromTemplateService chartFromTemplateService, IProjectRetriever projectRetriever, IChartTemplatePersistor chartTemplatePersistor, IChartUpdater chartUpdater, IDialogCreator dialogCreator,
Expand All @@ -42,6 +43,7 @@ public ChartTemplatingTask(IChartFromTemplateService chartFromTemplateService, I
_quantityDisplayPathMapper = quantityDisplayPathMapper;
_chartTemplateMapper = chartTemplateMapper;
_executionContext = executionContext;
_cloneManager = cloneManager;
_chartTask = chartTask;
}

Expand Down Expand Up @@ -91,7 +93,7 @@ private void addObservedDataToChart(IChartEditorPresenter chartEditorPresenter,
public SimulationTimeProfileChart CloneChart(SimulationTimeProfileChart originalChart, IndividualSimulation simulation)
{
var clonedChart = _chartFactory.Create(originalChart.GetType()).WithName(originalChart.Name);
clonedChart.UpdateFrom(originalChart);
clonedChart.UpdatePropertiesFrom(originalChart, _cloneManager);

initializeFromTemplate(originalChart, clonedChart, simulation);

Expand All @@ -103,12 +105,15 @@ private void initializeFromTemplate(CurveChart originalChart, CurveChart clonedC
var allAvailableColumns = new List<DataColumn>();
addSimulationResults(simulation, allAvailableColumns);
addObservedDataColumns(simulation, allAvailableColumns);
Func<DataColumn, string> curveNameDefinition = c => _quantityDisplayPathMapper.DisplayPathAsStringFor(simulation, c);
string curveNameDefinition(DataColumn c) => _quantityDisplayPathMapper.DisplayPathAsStringFor(simulation, c);
_chartFromTemplateService.InitializeChartFromTemplate(clonedChart, allAvailableColumns, _chartTemplateMapper.MapFrom(originalChart), curveNameDefinition);
}

private void addSimulationResults(IndividualSimulation simulation, List<DataColumn> allAvailableColumns)
{
if (simulation.DataRepository.IsNull())
return;

allAvailableColumns.AddRange(simulation.DataRepository);
}

Expand Down
2 changes: 1 addition & 1 deletion src/PKSim.Matlab/PKSim.Matlab.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<ItemGroup>
<PackageReference Include="OSPSuite.Utility" Version="4.0.0.4" />
<PackageReference Include="OSPSuite.Core" Version="11.0.145" />
<PackageReference Include="OSPSuite.Core" Version="11.0.146" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/PKSim.Presentation/PKSim.Presentation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<ItemGroup>
<PackageReference Include="OSPSuite.TeXReporting" Version="3.0.0.4" />
<PackageReference Include="OSPSuite.Utility" Version="4.0.0.4" />
<PackageReference Include="OSPSuite.Presentation" Version="11.0.145" />
<PackageReference Include="OSPSuite.Core" Version="11.0.145" />
<PackageReference Include="OSPSuite.Presentation" Version="11.0.146" />
<PackageReference Include="OSPSuite.Core" Version="11.0.146" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/PKSim.R/PKSim.R.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

<ItemGroup>
<PackageReference Include="OSPSuite.Utility" Version="4.0.0.4" />
<PackageReference Include="OSPSuite.Core" Version="11.0.145" />
<PackageReference Include="OSPSuite.Core" Version="11.0.146" />
<PackageReference Include="OSPSuite.FuncParser" Version="4.0.0.52" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.SimModel" Version="4.0.0.47" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.SimModelSolver_CVODES" Version="4.1.0.8" GeneratePathProperty="true" />
Expand Down
6 changes: 3 additions & 3 deletions src/PKSim.UI/PKSim.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
<PackageReference Include="OSPSuite.DataBinding.DevExpress" Version="6.0.0.2" />
<PackageReference Include="OSPSuite.DevExpress" Version="21.2.3" />
<PackageReference Include="OSPSuite.Utility" Version="4.0.0.4" />
<PackageReference Include="OSPSuite.Presentation" Version="11.0.145" />
<PackageReference Include="OSPSuite.UI" Version="11.0.145" />
<PackageReference Include="OSPSuite.Core" Version="11.0.145" />
<PackageReference Include="OSPSuite.Presentation" Version="11.0.146" />
<PackageReference Include="OSPSuite.UI" Version="11.0.146" />
<PackageReference Include="OSPSuite.Core" Version="11.0.146" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/PKSim/PKSim.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OSPSuite.Core" Version="11.0.145" />
<PackageReference Include="OSPSuite.Core" Version="11.0.146" />
<PackageReference Include="OSPSuite.DevExpress" Version="21.2.3" />
<PackageReference Include="OSPSuite.FuncParser" Version="4.0.0.52" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.SimModel" Version="4.0.0.47" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.SimModelSolver_CVODES" Version="4.1.0.8" GeneratePathProperty="true" />
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.112" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.Presentation" Version="11.0.145" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.Presentation" Version="11.0.146" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.TeXReporting" Version="3.0.0.4" GeneratePathProperty="true" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion tests/PKSim.Matlab.Tests/PKSim.Matlab.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="OSPSuite.BDDHelper" Version="4.0.0.1" />
<PackageReference Include="OSPSuite.Core" Version="11.0.145" />
<PackageReference Include="OSPSuite.Core" Version="11.0.146" />
<PackageReference Include="OSPSuite.FuncParser" Version="4.0.0.52" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.SimModel" Version="4.0.0.47" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.SimModelSolver_CVODES" Version="4.1.0.8" GeneratePathProperty="true" />
Expand Down
2 changes: 1 addition & 1 deletion tests/PKSim.R.Tests/PKSim.R.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="OSPSuite.BDDHelper" Version="4.0.0.1" />
<PackageReference Include="OSPSuite.Core" Version="11.0.145" />
<PackageReference Include="OSPSuite.Core" Version="11.0.146" />
<PackageReference Include="OSPSuite.FuncParser" Version="4.0.0.52" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.SimModel" Version="4.0.0.47" GeneratePathProperty="true" />
<PackageReference Include="OSPSuite.SimModelSolver_CVODES" Version="4.1.0.8" GeneratePathProperty="true" />
Expand Down
Loading