Browse Source

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

4.0
Daniel Grunwald 14 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 @@ -136,7 +136,13 @@ namespace ICSharpCode.GitAddIn
WorkbenchSingleton.SafeThreadAsyncCall(
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 @@ -196,6 +202,7 @@ namespace ICSharpCode.GitAddIn
g.DrawImage(statusImages, destRect, srcRect, GraphicsUnit.Pixel);
//g.DrawLine(Pens.Black, 0, 0, 7, 10);
}
smallImage.Tag = typeof(GitAddIn.OverlayIconManager);
statusIcons[index] = smallImage;
}
return statusIcons[index];

Loading…
Cancel
Save