Clone
ixen
committed
on 16 Nov 20
Added support for defining feedback rules in task edit dialog.
src/libchcore/ConfigNodeContainer.cpp (+1 -1)
159 159                         if (pairFnd.first == m_mic.end())
160 160                         {
161 161                                 // insert new items
162 162                                 for (size_t stIndex = 0; stIndex < rValue.GetCount(); ++stIndex)
163 163                                 {
164 164                                         m_mic.insert(ConfigNode(++m_oidLastObjectID, pszPropName, boost::numeric_cast<int>(stIndex), rValue.GetAt(stIndex)));
165 165                                 }
166 166
167 167                                 return false;
168 168                         }
169 169                         else
170 170                         {
171 171                                 // insert/modify/delete items (diff mode)
172 172                                 size_t stIndex = 0;
173 173                                 while (pairFnd.first != m_mic.end() && pairFnd.first != pairFnd.second)
174 174                                 {
175 175                                         if (stIndex < rValue.GetCount())
176 176                                         {
177 177                                                 // update existing item
178 178                                                 ChangeOrderAndValue tChange(rValue.GetAt(stIndex), boost::numeric_cast<int>(stIndex));
179                                                   m_mic.modify(pairFnd.first, tChange);
  179                                                 m_mic.modify(pairFnd.first, std::ref(tChange));
180 180
181 181                                                 ++pairFnd.first;
182 182                                         }
183 183                                         else
184 184                                         {
185 185                                                 // delete this item
186 186                                                 m_setRemovedObjects.Add(pairFnd.first->m_oidObjectID);
187 187                                                 pairFnd.first = m_mic.erase(pairFnd.first);
188 188                                         }
189 189
190 190                                         ++stIndex;
191 191                                 }
192 192
193 193                                 while (stIndex < rValue.GetCount())
194 194                                 {
195 195                                         // add items not added before (with new oids)
196 196                                         m_mic.insert(ConfigNode(++m_oidLastObjectID, pszPropName, boost::numeric_cast<int>(stIndex), rValue.GetAt(stIndex)));
197 197                                         ++stIndex;
198 198                                 }
199 199