#3698 Scale bar. Enable check box for showing/hiding scale bar

This commit is contained in:
Bjørn Erik Jensen 2018-11-20 12:07:39 +01:00
parent e3c619ddfe
commit 939dfe664a

View File

@ -66,9 +66,6 @@ RimContourMapView::RimContourMapView()
m_contourMapProjectionPartMgr = new RivContourMapProjectionPartMgr(contourMapProjection(), this); m_contourMapProjectionPartMgr = new RivContourMapProjectionPartMgr(contourMapProjection(), this);
((RiuViewerToViewInterface*)this)->setCameraPosition(defaultViewMatrix); ((RiuViewerToViewInterface*)this)->setCameraPosition(defaultViewMatrix);
//CAF_PDM_InitFieldNoDefault(&m_scaleLegendConfig, "ScaleLegendConfig", "Scale Legend Config", "", "", "");
//m_scaleLegendConfig = new RimScaleLegendConfig();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -307,8 +304,7 @@ void RimContourMapView::updateLegends()
} }
} }
//m_viewer->addColorLegendToBottomLeftCorner(m_scaleLegendConfig->titledOverlayFrame()); m_viewer->showScaleLegend(m_showScaleLegend());
m_viewer->showScaleLegend(true);
} }
} }
@ -364,6 +360,11 @@ void RimContourMapView::fieldChangedByUi(const caf::PdmFieldHandle* changedField
{ {
scheduleCreateDisplayModelAndRedraw(); scheduleCreateDisplayModelAndRedraw();
} }
else if (changedField == &m_showScaleLegend)
{
updateLegends();
scheduleCreateDisplayModelAndRedraw();
}
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------