mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
AppFwk: Add editor attribute. Object-only SelectionManager use. Use SelectionChangedReceiver. Improve tableview-checkbox selection behaviour and look.
This commit is contained in:
@@ -152,8 +152,6 @@ bool PdmUiTableViewQModel::setData(const QModelIndex &index, const QVariant &val
|
||||
{
|
||||
if (isRepresentingBoolean(index))
|
||||
{
|
||||
// Clear current selection, UI does not behave well for multiple selection
|
||||
SelectionManager::instance()->clear(SelectionManager::CURRENT);
|
||||
|
||||
bool toggleOn = (value == Qt::Checked);
|
||||
|
||||
@@ -657,8 +655,8 @@ QItemSelection PdmUiTableViewQModel::modelIndexFromPdmObject(PdmObjectHandle* pd
|
||||
PdmObjectHandle* obj = this->pdmObjectForRow(i);
|
||||
if (obj == pdmObject)
|
||||
{
|
||||
// Currently selection only on model index, can be extended to select whole row
|
||||
itemSelection.select(this->createIndex(i, 0), this->createIndex(i, 0));
|
||||
// Select whole row
|
||||
itemSelection.select(this->createIndex(i, 0), this->createIndex(i, this->columnCount()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user