mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#539) Check for NULL pointer when deciding what kind of range filter collection to use
As the management of override range filter collection is handled independenly from scheduleRedraw, we must check for a valid pointer when trying to access the override range filter
This commit is contained in:
parent
4b95f2b807
commit
dbd6ce09c5
@ -19,16 +19,18 @@
|
||||
|
||||
#include "RicUnLinkViewFeature.h"
|
||||
|
||||
#include "RimViewController.h"
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RimProject.h"
|
||||
#include "RimView.h"
|
||||
#include "RimViewController.h"
|
||||
#include "RimViewLinker.h"
|
||||
|
||||
#include "cafCmdFeatureManager.h"
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include <QAction>
|
||||
#include "RiaApplication.h"
|
||||
#include "RimProject.h"
|
||||
#include "cafCmdFeatureManager.h"
|
||||
|
||||
|
||||
CAF_CMD_SOURCE_INIT(RicUnLinkViewFeature, "RicUnLinkViewFeature");
|
||||
|
||||
|
@ -563,9 +563,8 @@ void RimView::addWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimCellRangeFilterCollection* RimView::rangeFilterCollection()
|
||||
{
|
||||
if (this->viewController() && this->viewController()->isRangeFiltersControlled())
|
||||
if (this->viewController() && this->viewController()->isRangeFiltersControlled() && m_overrideRangeFilterCollection)
|
||||
{
|
||||
CVF_ASSERT(m_overrideRangeFilterCollection());
|
||||
return m_overrideRangeFilterCollection;
|
||||
}
|
||||
else
|
||||
@ -579,9 +578,8 @@ RimCellRangeFilterCollection* RimView::rangeFilterCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RimCellRangeFilterCollection* RimView::rangeFilterCollection() const
|
||||
{
|
||||
if (this->viewController() && this->viewController()->isRangeFiltersControlled())
|
||||
if (this->viewController() && this->viewController()->isRangeFiltersControlled() && m_overrideRangeFilterCollection)
|
||||
{
|
||||
CVF_ASSERT(m_overrideRangeFilterCollection());
|
||||
return m_overrideRangeFilterCollection;
|
||||
}
|
||||
else
|
||||
|
@ -237,7 +237,6 @@ void RiuViewer::mouseReleaseEvent(QMouseEvent* event)
|
||||
return;
|
||||
}
|
||||
|
||||
event->accept();
|
||||
m_viewerCommands->displayContextMenu(event);
|
||||
return;
|
||||
}
|
||||
|
@ -266,14 +266,7 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
|
||||
|
||||
if (menu.actions().size() > 0)
|
||||
{
|
||||
// event->accept();
|
||||
QAction* act = menu.exec(event->globalPos());
|
||||
/*
|
||||
if (act)
|
||||
{
|
||||
cvf::Trace::show("Jadda");
|
||||
}
|
||||
*/
|
||||
menu.exec(event->globalPos());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user