Skip to content
Snippets Groups Projects
Commit 82ebbddd authored by t.knopff's avatar t.knopff
Browse files

Get rid of message "DEBUG: bool QCPLayoutGrid::addElement(int, int,...

Get rid of message "DEBUG: bool QCPLayoutGrid::addElement(int, int, QCPLayoutElement*) There is already an element in the specified row/column: 0 1"
parent 707023e2
No related branches found
No related tags found
1 merge request!396Small fix: get rid of message "DEBUG: bool QCPLayoutGrid::addElement(int, int,...
Pipeline #47023 passed
...@@ -414,7 +414,8 @@ void ColorMap::setColorScaleVisible(bool visibility_flag) ...@@ -414,7 +414,8 @@ void ColorMap::setColorScaleVisible(bool visibility_flag)
m_colorBarLayout->setVisible(visibility_flag); m_colorBarLayout->setVisible(visibility_flag);
if (visibility_flag) { if (visibility_flag) {
// add it to the right of the main axis rect // add it to the right of the main axis rect
m_customPlot->plotLayout()->addElement(0, 1, m_colorBarLayout); if (!m_customPlot->plotLayout()->hasElement(0, 1))
m_customPlot->plotLayout()->addElement(0, 1, m_colorBarLayout);
} else { } else {
m_customPlot->plotLayout()->take(m_colorBarLayout); m_customPlot->plotLayout()->take(m_colorBarLayout);
m_customPlot->plotLayout()->simplify(); m_customPlot->plotLayout()->simplify();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment