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

repair bug introduced in ada416 (line masks not shown)

parent e1e5d92d
No related branches found
No related tags found
1 merge request!2250repair recently introduced bug
Pipeline #124000 failed
......@@ -38,9 +38,9 @@ public:
public slots:
void onGeometryChange();
void onVisibilityChange();
virtual void update_view() = 0; //!< update visual appearance of view (triggered by event)
protected slots:
virtual void update_view() = 0; //!< update visual appearance of view (triggered by event)
virtual void onChangedX() {}
virtual void onChangedY() {}
virtual void onPropertyChange() {}
......
......@@ -19,7 +19,6 @@
#include <QCursor>
#include <QPainter>
#include <QStyleOptionGraphicsItem>
#include <iostream>
namespace {
......@@ -145,8 +144,6 @@ void VerticalLineOverlay::update_view()
setX(m_plot->toSceneX(m_item->pos()));
setY(plot_scene_rectangle.top());
std::cout<<"DEBUG height="<<plot_scene_rectangle.height()<<" xhig_in="<<m_item->pos()
<<" xhig_to="<<m_plot->toSceneX(m_item->pos())<<" width="<<mask_width<<std::endl;
m_bounding_rect = QRectF(-mask_width / 2., 0.0, mask_width, plot_scene_rectangle.height());
update();
}
......
......@@ -26,7 +26,6 @@
#include "GUI/View/Scene/MaskGraphicsProxy.h"
#include "GUI/View/Scene/OverlayFactory.h"
#include <QGraphicsSceneContextMenuEvent>
#include <iostream>
namespace {
......@@ -447,6 +446,7 @@ IOverlay* MaskGraphicsScene::registerOverlay(OverlayItem* item)
m_mask2overlay[item] = overlay;
addItem(overlay);
}
overlay->update_view();
return overlay;
}
......@@ -578,7 +578,6 @@ void MaskGraphicsScene::processLineItem(QGraphicsSceneMouseEvent* event)
setDrawingInProgress(true);
QPointF click_pos = event->buttonDownScenePos(Qt::LeftButton);
std::cout<<"DEBUG MaskGraphicsScene::processLineItem mm="<<m_mask_mode<<std::endl;
if (m_mask_mode == MaskFlags::VERTICAL_LINE_MODE)
processVerticalLineItem(click_pos);
if (m_mask_mode == MaskFlags::HORIZONTAL_LINE_MODE)
......@@ -602,8 +601,6 @@ void MaskGraphicsScene::processVerticalLineItem(const QPointF& pos)
m_mask_list_model->insertMask(0, item);
m_active_mask = item;
item->setPos(m_plot->fromSceneX(pos.x()));
std::cout<<"DEBUG MaskGraphicsScene::processVerticalLineItem xin="<<pos.x()<<" xout="
<<m_plot->fromSceneX(pos.x())<<std::endl;
}
void MaskGraphicsScene::processHorizontalLineItem(const QPointF& pos)
......
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