diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-02-20 14:17:56 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-02-20 14:22:24 +0100 |
| commit | d8367a33368e783c15f2072daa9237b2643526d3 (patch) | |
| tree | b770c2b8d3d6f0b6f6f69676f0e42194af2c053a /src/GraphicObjects/TabItem.cs | |
| parent | 0ce668c6c13521ebfcb9ed02365556a31a65b6b2 (diff) | |
debug threading with new TemplatedGroup arch, review examples.singleLeveledTemplatedGroup
Diffstat (limited to 'src/GraphicObjects/TabItem.cs')
| -rw-r--r-- | src/GraphicObjects/TabItem.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/GraphicObjects/TabItem.cs b/src/GraphicObjects/TabItem.cs index 8364aace..eab0cb0d 100644 --- a/src/GraphicObjects/TabItem.cs +++ b/src/GraphicObjects/TabItem.cs @@ -159,13 +159,13 @@ namespace Crow public bool HoldCursor = false; public override bool PointIsIn (ref Point m) { - TabView tv = Parent as TabView; - bool tmp = base.PointIsIn (ref m); + if (!base.PointIsIn (ref m)) + return false; if (m.Y < tabThickness) return TabTitle.Slot.ContainsOrIsEqual (m); else - return this.isSelected && tmp; + return this.isSelected; } public override void onMouseDown (object sender, MouseButtonEventArgs e) { @@ -214,6 +214,10 @@ namespace Crow } public void butCloseTabClick (object sender, MouseButtonEventArgs e){ QueryClose.Raise (this, null); + //if tab is used as a templated item root in a templatedGroup, local datasource + //is not null, in this case, removing the data entries will delete automatically the item + if (localDataSourceIsNull) + (Parent as TabView).DeleteChild (this); } #endregion |