Skip to content
Snippets Groups Projects
Commit d2abd87b authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rm unused

parent e06ec84b
No related branches found
No related tags found
1 merge request!2129Resolve projection crashes
......@@ -24,12 +24,9 @@
#include "GUI/Support/Util/QCP_Util.h"
#include "GUI/Support/Util/Style.h"
#include "GUI/View/PlotScale/RangeUtil.h"
#include <boost/polymorphic_cast.hpp>
#include <qcustomplot.h>
#include <utility>
using boost::polymorphic_downcast;
ProjectionsPlot::ProjectionsPlot(GUI::ID::ProjectionType projectionType, QWidget* parent)
: QWidget(parent)
, m_projectionType(projectionType)
......@@ -187,11 +184,14 @@ void ProjectionsPlot::updateProjectionsData()
void ProjectionsPlot::updateProjections()
{
auto projn_items = data2DItem()->projectionContainerItem()->projectionsOfType(m_projectionType);
for (auto* projItem : projn_items) {
ASSERT(data2DItem());
auto container_item = data2DItem()->projectionContainerItem();
if (!container_item)
return;
auto projn_items = container_item->projectionsOfType(m_projectionType);
for (auto* projItem : projn_items)
if (isCorrectProjectionType(projItem))
setGraphFromItem(graphForItem(projItem), projItem);
}
replot();
}
......@@ -199,10 +199,9 @@ void ProjectionsPlot::onProjectionPropertyChanged(MaskRoot* item)
{
auto* projection = dynamic_cast<MaskItem*>(item);
ASSERT(projection);
if (isCorrectProjectionType(projection)) {
if (isCorrectProjectionType(projection))
if (auto* graph = graphForItem(projection))
setGraphFromItem(graph, projection);
}
replot();
}
......
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