From b4f4ad4e5960f3b915b3322b58ccc2bc055b113b Mon Sep 17 00:00:00 2001 From: Khairuddin Ni'am Date: Thu, 16 Dec 2010 11:46:25 +0700 Subject: [PATCH] bug fixed. --- Pinta.Core/Managers/ToolManager.cs | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Pinta.Core/Managers/ToolManager.cs b/Pinta.Core/Managers/ToolManager.cs index 55ceb7a..a7c6d6c 100644 --- a/Pinta.Core/Managers/ToolManager.cs +++ b/Pinta.Core/Managers/ToolManager.cs @@ -55,11 +55,12 @@ namespace Pinta.Core ToggleToolButton tb = (ToggleToolButton)sender; BaseTool t = FindTool (tb.Label); - + // Don't let the user unselect the current tool if (t.Name == CurrentTool.Name) { - //tb.Active = true; - //return; + if (prev_index != index) + tb.Active = true; + return; } SetCurrentTool (t); @@ -92,13 +93,13 @@ namespace Pinta.Core if (index == i) return; - + // Unload previous tool if needed if (index >= 0) { + prev_index = index; Tools[index].DoClearToolBar (PintaCore.Chrome.ToolToolBar); Tools[index].DoDeactivated (); Tools[index].ToolItem.Active = false; - prev_index = index; } // Load new tool -- 1.7.1