Patch #1664 2006-11-27 16:47

biplab

Partial fix of Bug #9546 (Untested, but should work)
Download
1664-Partial_fix_of.patch (838 bytes)
Category
Application::Bugfix
Status
Accepted
Close date
2006-12-04 20:01
Assigned to
mortenmacfly
--- C:/Required/svn-win32-1.3.0/bin/trunk/src/plugins/scriptedwizard/wizpage.cpp    Mon Nov 27 23:26:11 2006
+++ C:/Temp/wizpage.cpp    Tue Nov 28 17:42:52 2006
@@ -452,7 +452,7 @@
     wxArrayString valids = GetArrayFromString(validCompilerIDs, _T(";"), true);
     wxString def = compilerID;
     if (def.IsEmpty())
-        def = CompilerFactory::GetDefaultCompiler()->GetName();
+        def = CompilerFactory::GetDefaultCompilerID();
     int id = 0;
     wxComboBox* cmb = m_pCompilerPanel->GetCompilerCombo();
     cmb->Clear();
@@ -466,7 +466,7 @@
             {
                 cmb->Append(compiler->GetName());
                 if (compiler->GetID().IsSameAs(def))
-                    id = cmb->GetCount();
+                    id = (cmb->GetCount() - 1) < 0 ? 0 : (cmb->GetCount() - 1) ;
                 break;
             }
         }
biplab 2006-11-27 16:54

This should fix the bug when the AddCompilerPage is called with non-empty compilerID parameter. I couldn't test the fix as I never compiled Code::Blocks in my system.

I hope it should fix the problem partially.

biplab 2006-11-28 09:51

This patch fixes Bug #9533 and Bug #9546. The patch is complete. I have tested the patch and it is working.

mortenmacfly 2006-12-04 19:45

Have tested in too now for some days - seems to work fine, will apply soon...