mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Added some comments on getting rid of QModelIndex based commands
This commit is contained in:
parent
0a3ce268ac
commit
35f7b7db2f
@ -147,11 +147,13 @@ bool RimUiTreeModelPdm::deletePropertyFilter(const QModelIndex& itemIndex)
|
||||
bool wasSomeFilterActive = propertyFilterCollection->hasActiveFilters();
|
||||
|
||||
// Remove Ui items pointing at the pdm object to delete
|
||||
removeRows_special(itemIndex.row(), 1, itemIndex.parent());
|
||||
removeRows_special(itemIndex.row(), 1, itemIndex.parent()); // To be deleted
|
||||
|
||||
propertyFilterCollection->remove(propertyFilter);
|
||||
delete propertyFilter;
|
||||
|
||||
// updateUiSubTree(propertyFilterCollection); // To be enabled
|
||||
|
||||
if (wasFilterActive)
|
||||
{
|
||||
propertyFilterCollection->reservoirView()->scheduleGeometryRegen(RivReservoirViewPartMgr::PROPERTY_FILTERED);
|
||||
@ -187,11 +189,13 @@ bool RimUiTreeModelPdm::deleteRangeFilter(const QModelIndex& itemIndex)
|
||||
bool wasSomeFilterActive = rangeFilterCollection->hasActiveFilters();
|
||||
|
||||
// Remove Ui items pointing at the pdm object to delete
|
||||
removeRows_special(itemIndex.row(), 1, itemIndex.parent());
|
||||
removeRows_special(itemIndex.row(), 1, itemIndex.parent()); // To be deleted
|
||||
|
||||
rangeFilterCollection->remove(rangeFilter);
|
||||
delete rangeFilter;
|
||||
|
||||
// updateUiSubTree(rangeFilterCollection); // To be enabled
|
||||
|
||||
if (wasFilterActive)
|
||||
{
|
||||
rangeFilterCollection->reservoirView()->scheduleGeometryRegen(RivReservoirViewPartMgr::PROPERTY_FILTERED);
|
||||
@ -221,11 +225,12 @@ bool RimUiTreeModelPdm::deleteReservoirView(const QModelIndex& itemIndex)
|
||||
CVF_ASSERT(reservoirView);
|
||||
|
||||
// Remove Ui items pointing at the pdm object to delete
|
||||
removeRows_special(itemIndex.row(), 1, itemIndex.parent());
|
||||
removeRows_special(itemIndex.row(), 1, itemIndex.parent()); // To be deleted
|
||||
|
||||
reservoirView->eclipseCase()->removeReservoirView(reservoirView);
|
||||
delete reservoirView;
|
||||
|
||||
// updateUiSubTree(reservoirView->eclipseCase()); // To be enabled
|
||||
clearClipboard();
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user