mirror of https://github.com/BOINC/boinc.git
Mgr: fix a bug deleting entries from Task Selection control introduced on 9 November
svn path=/trunk/boinc/; revision=24577
This commit is contained in:
parent
248c9e8bc7
commit
46157c721d
|
@ -8374,3 +8374,12 @@ Charlie 9 Nov 2011
|
||||||
cs_cmdline.cpp
|
cs_cmdline.cpp
|
||||||
clientgui/
|
clientgui/
|
||||||
BOINCGUIApp.cpp
|
BOINCGUIApp.cpp
|
||||||
|
|
||||||
|
Charlie 11 Nov 2011
|
||||||
|
- Mgr: fix a bug deleting entries from Task Selection control which I
|
||||||
|
introduced on 9 November. Deleting an entry cvan create a gap in
|
||||||
|
the alphabetically sorted sequence, so we can't use my earlier
|
||||||
|
shortcut in checking for existing entries.
|
||||||
|
|
||||||
|
clientgui/
|
||||||
|
sg_TaskPanel.cpp
|
||||||
|
|
|
@ -736,6 +736,11 @@ void CSimpleTaskPanel::UpdateTaskSelectionList(bool reskin) {
|
||||||
is_alive.at(j) = true;
|
is_alive.at(j) = true;
|
||||||
break; // skip out of this loop
|
break; // skip out of this loop
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// if it isn't currently in the list then we have a new one! lets add it
|
||||||
|
if (!found) {
|
||||||
|
for(j = 0; j < count; ++j) {
|
||||||
alphaOrder = (m_TaskSelectionCtrl->GetString(j)).Cmp(resname);
|
alphaOrder = (m_TaskSelectionCtrl->GetString(j)).Cmp(resname);
|
||||||
#if SORTTASKLIST
|
#if SORTTASKLIST
|
||||||
if (alphaOrder > 0) {
|
if (alphaOrder > 0) {
|
||||||
|
@ -750,12 +755,9 @@ void CSimpleTaskPanel::UpdateTaskSelectionList(bool reskin) {
|
||||||
#if !SORTTASKLIST
|
#if !SORTTASKLIST
|
||||||
j = -1; // If not sorted, check new name from start for duplicate
|
j = -1; // If not sorted, check new name from start for duplicate
|
||||||
#endif
|
#endif
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if it isn't currently in the list then we have a new one! lets add it
|
|
||||||
if (!found) {
|
|
||||||
selData = new TaskSelectionData;
|
selData = new TaskSelectionData;
|
||||||
selData->result = result;
|
selData->result = result;
|
||||||
strncpy(selData->result_name, result->name, sizeof(selData->result_name));
|
strncpy(selData->result_name, result->name, sizeof(selData->result_name));
|
||||||
|
@ -785,8 +787,8 @@ void CSimpleTaskPanel::UpdateTaskSelectionList(bool reskin) {
|
||||||
is_alive.push_back(true);
|
is_alive.push_back(true);
|
||||||
}
|
}
|
||||||
++count;
|
++count;
|
||||||
}
|
} // End if (!found)
|
||||||
}
|
} // End for (i) loop
|
||||||
|
|
||||||
// Check items in descending order so deletion won't change indexes of items yet to be checked
|
// Check items in descending order so deletion won't change indexes of items yet to be checked
|
||||||
for(j = count-1; j >=0; --j) {
|
for(j = count-1; j >=0; --j) {
|
||||||
|
|
Loading…
Reference in New Issue