Patch #2220 2007-10-26 00:14
pauliusz
Fix target deletion- Download
- 2220-Fix_target_del.patch (1.0 KB)
Index: src/sdk/projectoptionsdlg.cpp
===================================================================
--- src/sdk/projectoptionsdlg.cpp (revision 4560)
+++ src/sdk/projectoptionsdlg.cpp (working copy)
@@ -212,7 +212,7 @@
for (int i = 0; i < m_Project->GetBuildTargetsCount(); ++i)
lstTargets->Append(m_Project->GetBuildTarget(i)->GetTitle());
lstTargets->SetSelection(0);
- DoTargetChange();
+ DoTargetChange(false);
}
void ProjectOptionsDlg::DoTargetChange(bool saveOld)
@@ -641,12 +641,11 @@
if (dlg.ShowModal() == wxID_NO)
return;
- // the target name in the units is changed by the project...
- m_Project->RemoveBuildTarget(targetIdx);
lstTargets->Delete(targetIdx);
lstTargets->SetSelection(targetIdx);
- m_Current_Sel = -1;
- DoTargetChange();
+ // the target name in the units is changed by the project...
+ m_Project->RemoveBuildTarget(targetIdx);
+ DoTargetChange(false);
BuildScriptsTree();
CodeBlocksEvent e(cbEVT_PROJECT_TARGETS_MODIFIED);
e.SetProject(m_Project);
History
pauliusz 2007-10-26 00:17
Fixes following bug:
When deleting first entry in the target list, second one is saved with the options from the first one.
biplab 2007-10-26 17:47
Thanks for your patch.