Patch #1990 2007-05-09 22:36

pauliusz

Tools: don't ask questions when removing separators
Download
1990-Tools_don_t_as.patch (823 bytes)
Category
Application::Refinement
Status
Accepted
Close date
2007-05-22 09:41
Assigned to
 
Index: src/sdk/configuretoolsdlg.cpp
===================================================================
--- src/sdk/configuretoolsdlg.cpp    (revision 3949)
+++ src/sdk/configuretoolsdlg.cpp    (working copy)
@@ -127,9 +127,10 @@
 {
     const wxListBox* list = XRCCTRL(*this, "lstTools", wxListBox);
     int sel = list->GetSelection();
-    if (cbMessageBox(_("Are you sure you want to remove this tool?"),
-                    _("Remove tool?"),
-                    wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION) == wxID_YES)
+    if (Manager::Get()->GetToolsManager()->GetToolByIndex(sel)->GetName() == CB_TOOLS_SEPARATOR
+        || cbMessageBox(_("Are you sure you want to remove this tool?"),
+                       _("Remove tool?"),
+                       wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION) == wxID_YES)
     {
         Manager::Get()->GetToolsManager()->RemoveToolByIndex(sel);
         DoFillList();
mandrav 2007-05-22 09:41

Patch applied.