diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2017-03-01 07:00:56 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2017-03-01 07:01:45 +0100 |
| commit | 58f542eb60e38f7b491edbbc6b9d22f0d69b68ff (patch) | |
| tree | 6263932a16f242916623929ebd416c3245d1be63 | |
| parent | 1d136a46481bbeffc00ac7d54bc3098cd32ca5a1 (diff) | |
restore lock in Visible prop of GO
| -rwxr-xr-x | Tests/Interfaces/Divers/0.crow | 8 | ||||
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 16 |
2 files changed, 13 insertions, 11 deletions
diff --git a/Tests/Interfaces/Divers/0.crow b/Tests/Interfaces/Divers/0.crow index 480dde3b..15ab65f4 100755 --- a/Tests/Interfaces/Divers/0.crow +++ b/Tests/Interfaces/Divers/0.crow @@ -142,13 +142,13 @@ </VerticalStack> <Splitter/> <VerticalStack Width="30%" Margin="5"> - <Border Margin="5" Height="Fit"> +<!-- <Border Margin="5" Height="Fit"> <Label Width="Stretched" Margin="1" Text="{../../dv.SelectedItem}"/> - </Border> - <Border Margin="5" Height="30%"> + </Border>--> +<!-- <Border Margin="5" Height="30%"> <DirectoryView Name="dv" CurrentDirectory="/" Margin="1"/> </Border> - <Splitter/> + <Splitter/>--> <ListBox Name="colorList" Data="{TestList}" Margin="5" ItemTemplate="#Tests.Interfaces.colorItem.crow" Template="#Crow.Templates.ScrollingListBox.goml" diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index 059fc568..22bfdea2 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -516,13 +516,15 @@ namespace Crow if (isVisible) RegisterForLayouting (LayoutingType.Sizing); else { - Slot.Width = 0; - LayoutChanged.Raise (this, new LayoutingEventArgs (LayoutingType.Width)); - Slot.Height = 0; - LayoutChanged.Raise (this, new LayoutingEventArgs (LayoutingType.Height)); - if (this.parent != null) - CurrentInterface.EnqueueForRepaint (this); - LastSlots.Width = LastSlots.Height = 0; + lock (CurrentInterface.UpdateMutex) { + Slot.Width = 0; + LayoutChanged.Raise (this, new LayoutingEventArgs (LayoutingType.Width)); + Slot.Height = 0; + LayoutChanged.Raise (this, new LayoutingEventArgs (LayoutingType.Height)); + if (this.parent != null) + CurrentInterface.EnqueueForRepaint (this); + LastSlots.Width = LastSlots.Height = 0; + } } //trigger a mouse to handle possible hover changes |