Skip to content

Commit

Permalink
2059 add explanation phenotypoe (#2108)
Browse files Browse the repository at this point in the history
* Fixes #2059 add explanation phenotype

* Fixes #2059 add explanation phenotype
  • Loading branch information
msevestre authored Mar 8, 2022
1 parent 70fbbed commit beec67d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/PKSim.Core/Model/ParameterMessages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static string ResetParameterValue(IParameter parameter, string parameterD
{
return PKSimConstants.Command.ResetParameterValueDescription(parameterDisplayName,
DisplayValueFor(parameter, oldValue),
DisplayValueFor(parameter, parameter.Value));
DisplayValueFor(parameter, tryGetValue(parameter)));
}

public static string DisplayValueFor(IParameter parameter, double baseValue, bool numericalDisplayOnly = false)
Expand Down
4 changes: 3 additions & 1 deletion src/PKSim.UI/UIConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static class Size

public static readonly int CONFIGURE_SIMULATION_VIEW_HEIGHT = ScaleForScreenDPI(708);
public static readonly int CREATE_SIMULATION_VIEW_HEIGHT = ScaleForScreenDPI(750);
public static readonly int SIMULATION_VIEW_WIDTH = ScaleForScreenDPI(580);
public static readonly int SIMULATION_VIEW_WIDTH = ScaleForScreenDPI(650);

public static readonly int EXPRESSION_QUERY_VIEW_HEIGHT = ScaleForScreenDPI(900);
public static readonly int EXPRESSION_QUERY_VIEW_WIDTH = ScaleForScreenDPI(1100);
Expand All @@ -32,6 +32,8 @@ public static class Size
public static readonly int PROTOCOL_VIEW_WIDTH = ScaleForScreenDPI(700);
public static readonly int PROTOCOL_VIEW_HEIGHT = ScaleForScreenDPI(760);

public static readonly int EXPRESSION_PROFILE_LOCALIZATION_HEIGHT = ScaleForScreenDPI(80);

public static readonly int EXPRESSION_PROFILE_VIEW_HEIGHT = ScaleForScreenDPI(900);
public static readonly int EXPRESSION_PROFILE_VIEW_WIDTH = ScaleForScreenDPI(760);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using OSPSuite.Assets;
using System.Windows.Forms;
using DevExpress.XtraLayout.Utils;
using OSPSuite.Assets;
using OSPSuite.DataBinding;
using OSPSuite.DataBinding.DevExpress;
using OSPSuite.Presentation.Extensions;
Expand Down
3 changes: 2 additions & 1 deletion src/PKSim.UI/Views/Individuals/ExpressionLocalizationView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using PKSim.Presentation.Views.Individuals;
using System;
using System.Linq.Expressions;
using static PKSim.UI.UIConstants.Size;

namespace PKSim.UI.Views.Individuals
{
Expand Down Expand Up @@ -81,6 +82,6 @@ private void bind(Expression<Func<IndividualProtein, bool>> expression, CheckEdi
});
}

public override int OptimalHeight => Root.Bounds.Height + layoutControl.Margin.Top;
public override int OptimalHeight => EXPRESSION_PROFILE_LOCALIZATION_HEIGHT;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using DevExpress.Utils;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Repository;
Expand Down Expand Up @@ -100,6 +101,9 @@ public override int OptimalHeight
get
{
var warningHeight = layoutItemWarning.Visible ? layoutItemWarning.Height : 1;
if (!_gridViewBinder.Source?.Any() ?? false)
warningHeight += emptySpaceItem1.Height;

return layoutItemCompounds.Padding.Height + gridView.OptimalHeight + layoutItemAddCompound.Height + warningHeight + emptySpaceItem2.Height;
}
}
Expand Down

0 comments on commit beec67d

Please sign in to comment.