Patch #2943 2010-03-06 18:56

tpetrov

Respect the selected target
Download
2943-Respect_the_se.patch (1.2 KB)
Category
Application::Refinement
Status
Accepted
Close date
2010-08-23 05:46
Assigned to
mortenmacfly
Index: src/sdk/projectmanager.cpp
===================================================================
--- src/sdk/projectmanager.cpp    (revision 6508)
+++ src/sdk/projectmanager.cpp    (working copy)
@@ -1791,7 +1791,7 @@
 void ProjectManager::OnExecParameters(wxCommandEvent& /*event*/)
 {
     if (m_pActiveProject)
-        m_pActiveProject->SelectTarget(0, true);
+        m_pActiveProject->SelectTarget(-1, true);
 }
 
 void ProjectManager::OnRightClick(wxCommandEvent& /*event*/)
Index: src/sdk/selecttargetdlg.cpp
===================================================================
--- src/sdk/selecttargetdlg.cpp    (revision 6508)
+++ src/sdk/selecttargetdlg.cpp    (working copy)
@@ -47,7 +47,12 @@
     if (selected != -1)
         list->SetSelection(selected);
     else
-        list->SetSelection(list->FindString(m_pProject->GetDefaultExecuteTarget()));
+    {
+        int item = list->FindString(m_pProject->GetActiveBuildTarget());
+        if (item == wxNOT_FOUND)
+            item = list->FindString(m_pProject->GetDefaultExecuteTarget());
+        list->SetSelection(item);
+    }
 
     UpdateSelected();
     XRCCTRL(*this, "wxID_OK", wxButton)->MoveBeforeInTabOrder (XRCCTRL(*this, "lstItems", wxListBox));
tpetrov 2010-08-21 19:32

Updated patch to compile against trunk r6508

It seems that the profiler part of the code is applied but the other is not.

tpetrov 2010-08-21 19:43

this time upload the patch