##// END OF EJS Templates
Uses static_cast instead of dynamic_cast
Alexandre Leroux -
r1029:5cfc8a26e17a
parent child
Show More
@@ -223,7 +223,7 VisualizationGraphRenderingDelegate::VisualizationGraphRenderingDelegate(
223 void VisualizationGraphRenderingDelegate::onMouseDoubleClick(QMouseEvent *event) noexcept
223 void VisualizationGraphRenderingDelegate::onMouseDoubleClick(QMouseEvent *event) noexcept
224 {
224 {
225 // Opens color scale editor if color scale is double clicked
225 // Opens color scale editor if color scale is double clicked
226 auto colorScale = dynamic_cast<QCPColorScale *>(impl->m_Plot.layoutElementAt(event->pos()));
226 auto colorScale = static_cast<QCPColorScale *>(impl->m_Plot.layoutElementAt(event->pos()));
227 if (impl->m_ColorScale.m_Scale == colorScale) {
227 if (impl->m_ColorScale.m_Scale == colorScale) {
228 if (ColorScaleEditor{impl->m_ColorScale}.exec() == QDialog::Accepted) {
228 if (ColorScaleEditor{impl->m_ColorScale}.exec() == QDialog::Accepted) {
229 impl->m_Plot.replot();
229 impl->m_Plot.replot();
General Comments 0
You need to be logged in to leave comments. Login now