diff --git a/PROMS/Volian.Controls.Library/DisplayTags.cs b/PROMS/Volian.Controls.Library/DisplayTags.cs index cadc1ba4..c191a66a 100644 --- a/PROMS/Volian.Controls.Library/DisplayTags.cs +++ b/PROMS/Volian.Controls.Library/DisplayTags.cs @@ -103,7 +103,7 @@ namespace Volian.Controls.Library public string TbFSwd { get {return tbFSWd.Text;} - set { tbFSWd.Text = value; tbFSWd.Refresh(); trBarFS.Value = Convert.ToInt32(value); } + set { tbFSWd.Text = value; tbFSWd.Refresh(); } // trBarFS.Value = Convert.ToInt32(value); } public string TbFSht @@ -111,7 +111,7 @@ namespace Volian.Controls.Library get { return tbFSHt.Text; } set { tbFSHt.Text = value; tbFSHt.Refresh(); _origFigureSizeRatio = float.Parse(value) / float.Parse(tbFSWd.Text); } } - + #endregion #region Constructor public DisplayTags() diff --git a/PROMS/Volian.Controls.Library/ImageItem.cs b/PROMS/Volian.Controls.Library/ImageItem.cs index c419f9c9..b51fcd9b 100644 --- a/PROMS/Volian.Controls.Library/ImageItem.cs +++ b/PROMS/Volian.Controls.Library/ImageItem.cs @@ -256,7 +256,8 @@ namespace Volian.Controls.Library private int _origCfgHt = 0; // keep track if original size was stored in cfg private int _origCfgWd = 0; private bool _pastedNew = false; // need this for flagging newly pasted image (may need to clear cfg) - private DisplayTags _displayTags; + private DisplayTags _displayTags = new DisplayTags(); + //House myhouse = new House(); #endregion #region Constructors @@ -316,8 +317,11 @@ namespace Volian.Controls.Library } private void SetWidthsAndHeights(System.Drawing.Image img) { + int wd = img.Width * MyStepPanel.DPI / 72; // converts from screen resolution's DPI to image's points (72/inch) int ht = img.Height * MyStepPanel.DPI / 72; + + if (MyItemInfo.MyContent.MyImage != null) // image is null if creating new. { ImageConfig ic = new ImageConfig(MyItemInfo.MyContent.MyImage); @@ -340,9 +344,9 @@ namespace Volian.Controls.Library _displayTags.TbFSwd = wd.ToString(); _displayTags.TbFSht = ht.ToString(); } - - } + + // the following gets called for 'NEW' images private E_ImageSource InsType = E_ImageSource.None; public ImageItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand, EditItem nextEditItem, ImageItem.E_ImageSource insType, DisplayTags displayTags)