@@ -40,10 +40,13 @@ public abstract class BaseNode
4040 /// <summary>Gets or sets the parent node.</summary>
4141 public BaseContainerNode ParentNode { get ; internal set ; }
4242
43- /// <summary>Gets or sets a value indicating whether this object is hidden.</summary>
43+ /// <summary>Gets or sets a value indicating whether this node is wrapped into an other node.</summary>
44+ public bool IsWrapped { get ; internal set ; }
45+
46+ /// <summary>Gets or sets a value indicating whether this node is hidden.</summary>
4447 public bool IsHidden { get ; set ; }
4548
46- /// <summary>Gets or sets a value indicating whether this object is selected.</summary>
49+ /// <summary>Gets or sets a value indicating whether this node is selected.</summary>
4750 public bool IsSelected { get ; set ; }
4851
4952 /// <summary>Size of the node in bytes.</summary>
@@ -273,7 +276,7 @@ protected void AddSelection(ViewInfo view, int x, int y, int height)
273276 Contract . Requires ( view != null ) ;
274277 Contract . Requires ( view . Context != null ) ;
275278
276- if ( y > view . ClientArea . Bottom || y + height < 0 )
279+ if ( y > view . ClientArea . Bottom || y + height < 0 || IsWrapped )
277280 {
278281 return ;
279282 }
@@ -286,7 +289,7 @@ protected void AddSelection(ViewInfo view, int x, int y, int height)
286289 }
287290 }
288291
289- AddHotSpot ( view , new Rectangle ( 0 , y , view . ClientArea . Right - ( IsSelected ? 16 : 0 ) , height ) , string . Empty , - 1 , HotSpotType . Select ) ;
292+ AddHotSpot ( view , new Rectangle ( 0 , y , view . ClientArea . Right - ( IsSelected ? 16 : 0 ) , height ) , string . Empty , HotSpot . NoneId , HotSpotType . Select ) ;
290293 }
291294
292295 /// <summary>Draws an icon and adds a <see cref="HotSpot"/> if <paramref name="id"/> is not <see cref="HotSpot.NoneId"/>.</summary>
@@ -310,7 +313,7 @@ protected int AddIcon(ViewInfo view, int x, int y, Image icon, int id, HotSpotTy
310313
311314 view . Context . DrawImage ( icon , x + 2 , y , Icons . Dimensions , Icons . Dimensions ) ;
312315
313- if ( id != - 1 )
316+ if ( id != HotSpot . NoneId )
314317 {
315318 AddHotSpot ( view , new Rectangle ( x , y , Icons . Dimensions , Icons . Dimensions ) , string . Empty , id , type ) ;
316319 }
@@ -344,7 +347,7 @@ protected void AddTypeDrop(ViewInfo view, int y)
344347 Contract . Requires ( view != null ) ;
345348 Contract . Requires ( view . Context != null ) ;
346349
347- if ( view . MultipleNodesSelected || ( y > view . ClientArea . Bottom || y + Icons . Dimensions < 0 ) )
350+ if ( view . MultipleNodesSelected || y > view . ClientArea . Bottom || y + Icons . Dimensions < 0 || IsWrapped )
348351 {
349352 return ;
350353 }
@@ -363,7 +366,7 @@ protected void AddDelete(ViewInfo view, int y)
363366 Contract . Requires ( view != null ) ;
364367 Contract . Requires ( view . Context != null ) ;
365368
366- if ( y > view . ClientArea . Bottom || y + Icons . Dimensions < 0 )
369+ if ( y > view . ClientArea . Bottom || y + Icons . Dimensions < 0 || IsWrapped )
367370 {
368371 return ;
369372 }
0 commit comments