Browse Source

Git OverlayIconManager: avoid removing the overlay icons belonging to other version control systems.

4.0
Daniel Grunwald 15 years ago
parent
commit
857dec863b
  1. 9
      src/AddIns/VersionControl/GitAddIn/Src/OverlayIconManager.cs

9
src/AddIns/VersionControl/GitAddIn/Src/OverlayIconManager.cs

@ -136,7 +136,13 @@ namespace ICSharpCode.GitAddIn
WorkbenchSingleton.SafeThreadAsyncCall( WorkbenchSingleton.SafeThreadAsyncCall(
delegate { delegate {
node.Overlay = GetImage(status); Image image = GetImage(status);
if (image != null) {
node.Overlay = image;
} else if (node.Overlay != null && (node.Overlay.Tag as Type) == typeof(GitAddIn.OverlayIconManager)) {
// reset overlay to null only if the old overlay belongs to the OverlayIconManager
node.Overlay = null;
}
}); });
} }
@ -196,6 +202,7 @@ namespace ICSharpCode.GitAddIn
g.DrawImage(statusImages, destRect, srcRect, GraphicsUnit.Pixel); g.DrawImage(statusImages, destRect, srcRect, GraphicsUnit.Pixel);
//g.DrawLine(Pens.Black, 0, 0, 7, 10); //g.DrawLine(Pens.Black, 0, 0, 7, 10);
} }
smallImage.Tag = typeof(GitAddIn.OverlayIconManager);
statusIcons[index] = smallImage; statusIcons[index] = smallImage;
} }
return statusIcons[index]; return statusIcons[index];

Loading…
Cancel
Save