From 241785846e02b8cdf1497e9aed1501cb1228f4bb Mon Sep 17 00:00:00 2001 From: Kevin Laskey Date: Tue, 4 Jun 2024 11:55:17 -0400 Subject: [PATCH] Update for displaying when a figure is selected or added (as opposed to a step or some other type of option) --- PROMS/Volian.Controls.Library/DisplayTags.cs | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/PROMS/Volian.Controls.Library/DisplayTags.cs b/PROMS/Volian.Controls.Library/DisplayTags.cs index 154972ce..873fe01a 100644 --- a/PROMS/Volian.Controls.Library/DisplayTags.cs +++ b/PROMS/Volian.Controls.Library/DisplayTags.cs @@ -404,8 +404,11 @@ namespace Volian.Controls.Library } else { - //No Current image, but still show groupPanelFigSize, will adjust when file is selected. - groupPanelFigSize.Visible = true; + if (MyEditItem.MyItemInfo.IsFigure) + //No Current image, but still show groupPanelFigSize, will adjust when file is selected. + groupPanelFigSize.Visible = true; + else + groupPanelFigSize.Visible = false; } // change bar setting depends on whether step has changed (dts) as compared to date/time off the @@ -872,11 +875,14 @@ namespace Volian.Controls.Library // restore the orignal image size private void btnFSrestore_Click(object sender, EventArgs e) { - tbFSWd.Text = _origFigureSizeWidth.ToString(); - int ht = (int)(_origFigureSizeRatio * _origFigureSizeWidth); - tbFSHt.Text = ht.ToString(); - (MyEditItem as ImageItem).SizeImage(_origFigureSizeWidth, ht); - trBarFS.Value = _origFigureSizeWidth; + if (_origFigureSizeWidth != 0) + { + tbFSWd.Text = _origFigureSizeWidth.ToString(); + int ht = (int)(_origFigureSizeRatio * _origFigureSizeWidth); + tbFSHt.Text = ht.ToString(); + (MyEditItem as ImageItem).SizeImage(_origFigureSizeWidth, ht); + trBarFS.Value = _origFigureSizeWidth; + } } // user entered width in text box, this event gets called on leave of text box. private void tbFSWd_Leave(object sender, EventArgs e)