mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix missing blocking of selection manager update when updating table selection
Caused crash in the Well Path editing (dragging targets)
This commit is contained in:
parent
bddaf9d602
commit
e93a07b43b
@ -298,8 +298,10 @@ void PdmUiTableViewEditor::onSelectionManagerSelectionChanged(int selectionLevel
|
||||
QItemSelection itemSelection = m_tableModelPdm->modelIndexFromPdmObject(pdmObj);
|
||||
totalSelection.merge(itemSelection, QItemSelectionModel::Select);
|
||||
}
|
||||
|
||||
|
||||
m_isUpdatingSelectionQModel = true;
|
||||
m_tableView->selectionModel()->select(totalSelection, QItemSelectionModel::SelectCurrent);
|
||||
m_isUpdatingSelectionQModel = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -310,7 +312,7 @@ void PdmUiTableViewEditor::onSelectionManagerSelectionChanged(int selectionLevel
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void PdmUiTableViewEditor::slotSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected)
|
||||
{
|
||||
updateSelectionManagerFromTableSelection();
|
||||
if (!m_isUpdatingSelectionQModel) updateSelectionManagerFromTableSelection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -157,6 +157,7 @@ private:
|
||||
int m_tableSelectionLevel;
|
||||
int m_rowSelectionLevel;
|
||||
bool m_isBlockingSelectionManagerChanged;
|
||||
bool m_isUpdatingSelectionQModel;
|
||||
|
||||
caf::PdmChildArrayFieldHandle* m_previousFieldHandle;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user