Index: src/libchcore/TSubTaskArray.cpp =================================================================== diff -u -N -rfc67a825635691930b3ac00dc95b16e59f3d2fae -r213cc1a2b3530ea7cb31fd0dac258df23bcc3416 --- src/libchcore/TSubTaskArray.cpp (.../TSubTaskArray.cpp) (revision fc67a825635691930b3ac00dc95b16e59f3d2fae) +++ src/libchcore/TSubTaskArray.cpp (.../TSubTaskArray.cpp) (revision 213cc1a2b3530ea7cb31fd0dac258df23bcc3416) @@ -183,13 +183,8 @@ ISerializerContainerPtr spContainer = spSerializer->GetContainer(_T("subtasks_info")); InitSubtasksInfoColumns(spContainer); - ISerializerRowDataPtr spRow; + ISerializerRowDataPtr spRow = spContainer->GetRow(0, bAdded); - if(bAdded) - spRow = spContainer->AddRow(0); - else - spRow = spContainer->GetRow(0); - *spRow % TRowData(_T("operation"), m_eOperationType.Get()); } @@ -215,7 +210,7 @@ { const std::pair& rCurrentSubTask = m_vSubTasks[stSubOperationIndex]; - spRow = spContainer->AddRow(stSubOperationIndex); + spRow = spContainer->GetRow(stSubOperationIndex, bAdded); *spRow % TRowData(_T("type"), rCurrentSubTask.first->GetSubOperationType()) % TRowData(_T("is_current"), false) @@ -229,14 +224,14 @@ // mark subtask at current index as "current"; don't do that if we just finished. if(boost::numeric_cast(lCurrentIndex) != m_vSubTasks.size()) { - spRow = spContainer->GetRow(lCurrentIndex); + spRow = spContainer->GetRow(lCurrentIndex, false); *spRow % TRowData(_T("is_current"), true); } // unmark the old "current" subtask if(m_lLastStoredIndex != -1) { - spRow = spContainer->GetRow(m_lLastStoredIndex); + spRow = spContainer->GetRow(m_lLastStoredIndex, false); *spRow % TRowData(_T("is_current"), false); } }