Patch #2234 2007-11-08 01:35
pauliusz
Patch for Bug #12193 and Bug #11665- Download
- 2234-Patch_for_Bug.patch (1.6 KB)
Index: src/plugins/compilergcc/compilergcc.cpp
===================================================================
--- src/plugins/compilergcc/compilergcc.cpp (revision 4628)
+++ src/plugins/compilergcc/compilergcc.cpp (working copy)
@@ -1435,13 +1435,6 @@
void CompilerGCC::UpdateProjectTargets(cbProject* project)
{
- // keep a backup of old targets list so we can check for equality
- // with the new list we 'll create below.
- // if they 're equal, we can spare the DoRecreateTargetMenu() call
- // which might be slow (esp. on linux)
- wxArrayString oldTargets = m_Targets;
- int oldRealIdx = m_RealTargetsStartIndex;
-
m_Targets.Clear();
if (!project)
return;
@@ -1460,9 +1453,8 @@
// keep the index for the first real target
m_RealTargetsStartIndex = virtuals.GetCount();
- // actually rebuild menu and combo (if needed)
- if (oldRealIdx != m_RealTargetsStartIndex || m_Targets != oldTargets)
- DoRecreateTargetMenu();
+ // actually rebuild menu and combo
+ DoRecreateTargetMenu();
}
wxString CompilerGCC::GetTargetString(int index)
@@ -2270,11 +2262,11 @@
case bsProjectPostBuild:
{
- m_pLastBuildingTarget = 0;
// run project post-build steps
if (m_RunProjectPostBuild || m_pBuildingProject->GetAlwaysRunPostBuildSteps())
- cmds = dc.GetPostBuildCommands(0);
+ cmds = dc.GetPostBuildCommands(m_pLastBuildingTarget);
// reset
+ m_pLastBuildingTarget = 0;
m_RunProjectPostBuild = false;
break;
}
History
pauliusz 2007-11-08 01:39
This should completely fix these bugs. Would be good if somebody could test and report if it really works... It works for me at least :)
pauliusz 2007-11-13 02:32
Found that this bug was introduced in commit 3059. I have removed "speedup" that was causing these bugs. Although I haven't noticed any latency when switching between projects...
pauliusz 2007-11-13 16:06
Forgot to mention that I was testing everything in linux (Fedora 8)
mandrav 2007-11-15 12:37
Thank you.