From 6fe838007101406915395f3a6264b6bc64380fc8 Mon Sep 17 00:00:00 2001 From: Jerome St-Louis Date: Sat, 19 Dec 2015 16:10:07 -0500 Subject: [PATCH] ecere/gui/controls/DataBox: Only setting autoSize on editor if DataBox's autoSize is set to true - This allows to set autoSize on editor from outside without the DataBox reverting it to 'false' - Useful to setup editor alignment by setting autoSize on the editor itself within a DataBox filling up the ListBox cell ( http://ecere.com/forums/viewtopic.php?f=1&t=414 ) --- ecere/src/gui/controls/DataBox.ec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ecere/src/gui/controls/DataBox.ec b/ecere/src/gui/controls/DataBox.ec index 4e90f0c..0c3faa4 100644 --- a/ecere/src/gui/controls/DataBox.ec +++ b/ecere/src/gui/controls/DataBox.ec @@ -129,7 +129,8 @@ private: if(eClass_IsDerived(editor._class, class(EditBox))) { ((EditBox)editor).readOnly = readOnly; - ((EditBox)editor).autoSize = autoSize; + if(autoSize) + ((EditBox)editor).autoSize = autoSize; ((EditBox)editor).clickThrough = true; } else if(eClass_IsDerived(editor._class, class(Button)) && autoSize) -- 1.8.3.1