Refactoring more general stuff into RimView

updateViewerWidget
scheduleUpdateDisplayModelAndRedraw
This commit is contained in:
Jacob Støren
2015-04-30 10:34:15 +02:00
parent 4b7d593b3c
commit 3dac8807c7
10 changed files with 165 additions and 177 deletions
@@ -1969,7 +1969,7 @@ QString RiaApplication::commandLineParameterHelp() const
/// Schedule a creation of the Display model and redraw of the reservoir view
/// The redraw will happen as soon as the event loop is entered
//--------------------------------------------------------------------------------------------------
void RiaApplication::scheduleDisplayModelUpdateAndRedraw(RimReservoirView* resViewToUpdate)
void RiaApplication::scheduleDisplayModelUpdateAndRedraw(RimView* resViewToUpdate)
{
m_resViewsToUpdate.push_back(resViewToUpdate);
@@ -1992,13 +1992,13 @@ void RiaApplication::scheduleDisplayModelUpdateAndRedraw(RimReservoirView* resVi
void RiaApplication::slotUpdateScheduledDisplayModels()
{
// Compress to remove duplicates
std::set<RimReservoirView*> resViewsToUpdate;
std::set<RimView*> resViewsToUpdate;
for (size_t i = 0; i < m_resViewsToUpdate.size(); ++i)
{
resViewsToUpdate.insert(m_resViewsToUpdate[i]);
}
for (std::set<RimReservoirView*>::iterator it = resViewsToUpdate.begin(); it != resViewsToUpdate.end(); ++it )
for (std::set<RimView*>::iterator it = resViewsToUpdate.begin(); it != resViewsToUpdate.end(); ++it )
{
if (*it)
{