Skip to content
Snippets Groups Projects
Commit 7f5e89de authored by Mikhail Svechnikov's avatar Mikhail Svechnikov Committed by Mikhail Svechnikov
Browse files

protect updBoundingRect

parent a19d0685
No related branches found
No related tags found
1 merge request!2815Fix context management in the view widgets
......@@ -107,10 +107,17 @@ void MaskGraphicsScene::switchDataContext(Data2DItem* data_item)
onProjSetChanged();
// update bounding rectangle and replot masks on widget resize
connect(m_plot.get(), &ColorMap::marginsChanged, this, &MaskGraphicsScene::updateOverlays,
connect(m_plot.get(), &ColorMap::marginsChanged, this, &MaskGraphicsScene::updBoundingRect,
Qt::UniqueConnection);
}
void MaskGraphicsScene::updBoundingRect()
{
if (!m_data_item)
return;
updateOverlays();
}
void MaskGraphicsScene::clearOverlays()
{
for (QGraphicsItem* overlay : m_viewport->childItems()) {
......
......@@ -64,6 +64,9 @@ public slots:
void onProjSetChanged();
void onSceneSelectionChanged();
private slots:
void updBoundingRect();
private:
void mousePressEvent(QGraphicsSceneMouseEvent* event) override;
void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override;
......
......@@ -37,7 +37,7 @@ void ParameterTuningStackPresenter::setItem(JobItem* item, QObject* model)
show();
widget->setModel(model);
widget->setJobItem(item);
// widget->setJobItem(item);
}
ParameterTuningWidget* ParameterTuningStackPresenter::itemWidget()
......
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