Patch #2042 2007-06-08 21:37

raph_

wxSmith: "Resource already exists"
Download
2042-wxSmith_Resour.patch (582 bytes)
Category
Plugin::Bugfix
Status
Accepted
Close date
2007-06-09 14:26
Assigned to
 
Index: plugins/contrib/wxSmith/wxwidgets/wxsnewwindowdlg.cpp
===================================================================
--- plugins/contrib/wxSmith/wxwidgets/wxsnewwindowdlg.cpp    (revision 4078)
+++ plugins/contrib/wxSmith/wxwidgets/wxsnewwindowdlg.cpp    (working copy)
@@ -252,6 +252,9 @@
         return;
     }
 
+    // Disable button to prevent more clicks while resource is created
+    FindWindowById(wxID_OK)->Enable(false);
+
     // Adding new files to project
     wxArrayInt Targets;
     Manager::Get()->GetProjectManager()->AddFileToProject(Hdr,cbProj,Targets);
raph_ 2007-06-08 21:38

This "bug" occurs, if you hit the "OK" button in "New %s resource" dialog multiple times.