diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2017-01-30 12:09:57 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2017-01-30 12:09:57 +0100 |
| commit | 2d1fd70ffa422dfdcf25a8c39ae9f4806c57c6ed (patch) | |
| tree | 5863ec9bca19d06daacc12b131073877f4b8b930 /src/GraphicObjects/GraphicObject.cs | |
| parent | dc603ff31253879bb8effb6d529f266ff78e9f3e (diff) | |
make publi Initialize func of GraphicObj, test logical parent in popper to allow shared content, test parent == null on visible changed
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index 574870f8..f7e193e1 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -23,7 +23,7 @@ namespace Crow get { if (currentInterface == null) { currentInterface = Interface.CurrentInterface; - initialize (); + Initialize (); } return currentInterface; } @@ -53,7 +53,13 @@ namespace Crow #endif } #endregion - internal protected virtual void initialize(){ + + /// <summary> + /// Initialize this Graphic object instance by setting style and default values and loading template if required + /// </summary> + public virtual void Initialize(){ + if (currentInterface == null) + currentInterface = Interface.CurrentInterface; loadDefaultValues (); } #region private fields @@ -513,7 +519,8 @@ namespace Crow LayoutChanged.Raise (this, new LayoutingEventArgs (LayoutingType.Width)); Slot.Height = 0; LayoutChanged.Raise (this, new LayoutingEventArgs (LayoutingType.Height)); - CurrentInterface.EnqueueForRepaint (this); + if (this.parent != null) + CurrentInterface.EnqueueForRepaint (this); LastSlots.Width = LastSlots.Height = 0; } |