diff --git a/components/editorControls/macrocontainer/PrevalueEditor.cs b/components/editorControls/macrocontainer/PrevalueEditor.cs index 5ec7af1441..3051eadc8b 100644 --- a/components/editorControls/macrocontainer/PrevalueEditor.cs +++ b/components/editorControls/macrocontainer/PrevalueEditor.cs @@ -61,19 +61,20 @@ namespace umbraco.editorControls.macrocontainer numberPropertyPanel.Controls.Add(_txtMaxNumber); Controls.Add(numberPropertyPanel); - PropertyPanel heightPropertyPanel = new PropertyPanel(); - heightPropertyPanel.Text = "Prefered height"; - _txtPreferedHeight= new TextBox(); - _txtPreferedHeight.ID = "prefheight"; - heightPropertyPanel.Controls.Add(_txtPreferedHeight); - Controls.Add(heightPropertyPanel); - PropertyPanel widthPropertyPanel = new PropertyPanel(); widthPropertyPanel.Text = "Prefered width"; _txtPreferedWidth = new TextBox(); _txtPreferedWidth.ID = "prefwidth"; widthPropertyPanel.Controls.Add(_txtPreferedWidth); Controls.Add(widthPropertyPanel); + + PropertyPanel heightPropertyPanel = new PropertyPanel(); + heightPropertyPanel.Text = "Prefered height"; + _txtPreferedHeight = new TextBox(); + _txtPreferedHeight.ID = "prefheight"; + heightPropertyPanel.Controls.Add(_txtPreferedHeight); + Controls.Add(heightPropertyPanel); + } /// @@ -84,19 +85,21 @@ namespace umbraco.editorControls.macrocontainer { base.OnLoad(e); - if (!Page.IsPostBack) + if (_macroList.Items.Count < 1) { _macroList.DataValueField = "Alias"; _macroList.DataTextField = "Name"; _macroList.DataSource = Macro.GetAll(); _macroList.DataBound += new EventHandler(MacroList_DataBound); - + } + if (!Page.IsPostBack) + { if(MaxNumber != 0) _txtMaxNumber.Text = MaxNumber.ToString(); - if (PreferedHeight != 0) - _txtPreferedHeight.Text = PreferedHeight.ToString(); if(PreferedWidth != 0) _txtPreferedWidth.Text = PreferedWidth.ToString(); + if (PreferedHeight != 0) + _txtPreferedHeight.Text = PreferedHeight.ToString(); } _macroList.DataBind(); @@ -167,7 +170,7 @@ namespace umbraco.editorControls.macrocontainer if (_allowedMacros == null) { List result = new List(); - string values = Configuration.Split('|')[0]; + string values = !String.IsNullOrEmpty(Configuration) ? Configuration.Split('|')[0] : ""; if (!string.IsNullOrEmpty(values)) { diff --git a/umbraco/businesslogic/GlobalSettings.cs b/umbraco/businesslogic/GlobalSettings.cs index 73cb5c7cb3..c7f5e55daf 100644 --- a/umbraco/businesslogic/GlobalSettings.cs +++ b/umbraco/businesslogic/GlobalSettings.cs @@ -17,7 +17,7 @@ namespace umbraco { #region Private static fields // CURRENT UMBRACO VERSION ID - private static string _currentVersion = "4.1.0.RC"; + private static string _currentVersion = "4.5.0"; private static string _reservedUrlsCache; private static string _reservedPathsCache;