bool CSrLvliRecord::DeleteItem (CSrLvloSubrecord* pItem)
{
	if (pItem == NULL) return false;
	bool Result = m_Subrecords.Delete(pItem);

	if (Result) 
	{
		if (GetListCount() > 0) 
			SetListCount(GetListCount() - 1);
		else
			UpdateListCount();
	}

	return true;
}
Beispiel #2
0
void ListSelectDialog::LoadList()
{
	sList.Clear();
	LambdaTask::TaskFunc func = [&] (LambdaTask *task) -> wxThread::ExitCode
	{
		task->DoSetStatus("Loading list...");
		return (wxThread::ExitCode)DoLoadList();
	};

	LambdaTask *lTask = new LambdaTask(func);
	TaskProgressDialog taskDlg(this);
	taskDlg.ShowModal(lTask);
	delete lTask;

	UpdateListCount();
	listCtrl->Refresh();
	listCtrl->Update();

	UpdateOKBtn();
}