修改批量较深崩溃问题
This commit is contained in:
parent
e73337e29b
commit
72a0e01607
|
|
@ -84,7 +84,10 @@ void CchooseShiftCurvesDlg::slotOnOkBtnClicked()
|
|||
int nRowCount = m_pTableModel->rowCount();
|
||||
for(int i = 0; i < nRowCount; i++)
|
||||
{
|
||||
if(m_pTableModel->item(i,T_COLUMN_IS_CHECK_)->checkState()==Qt::Checked) {
|
||||
QStandardItem* pItem = m_pTableModel->item(i, T_COLUMN_IS_CHECK_);
|
||||
if (!pItem)
|
||||
continue;
|
||||
if(pItem->checkState()==Qt::Checked) {
|
||||
SelectTableItem tmpCurve;
|
||||
tmpCurve.m_iTableType=0;
|
||||
tmpCurve.m_strUuid = "";
|
||||
|
|
@ -131,9 +134,12 @@ void CchooseShiftCurvesDlg::slotOnCancelBtnClicked()
|
|||
}
|
||||
void CchooseShiftCurvesDlg::slotSelectAllClicked()
|
||||
{
|
||||
for(int i = 0; i < m_pTableModel->rowCount(); i++)
|
||||
int nrow = m_pTableModel->rowCount();
|
||||
for(int i = 0; i < nrow; i++)
|
||||
{
|
||||
m_pTableModel->item(i,T_COLUMN_IS_CHECK_)->setCheckState( Qt::Checked );
|
||||
QStandardItem* pItem = m_pTableModel->item(i, T_COLUMN_IS_CHECK_);
|
||||
if(pItem)
|
||||
pItem->setCheckState( Qt::Checked );
|
||||
}
|
||||
}
|
||||
void CchooseShiftCurvesDlg::slotSelectWellClicked()
|
||||
|
|
@ -432,6 +438,9 @@ void CchooseShiftCurvesDlg::slotCancelSelectClicked()
|
|||
{
|
||||
for(int i = 0; i < m_pTableModel->rowCount(); i++)
|
||||
{
|
||||
QStandardItem* pItem = m_pTableModel->item(i, T_COLUMN_IS_CHECK_);
|
||||
if (!pItem)
|
||||
continue;
|
||||
m_pTableModel->item(i,T_COLUMN_IS_CHECK_)->setCheckState( Qt::Unchecked );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user