##// END OF EJS Templates
Corrects the problem of refreshing synchronized graphs from TimeWidget (2)...
Alexandre Leroux -
r1326:2f3864d52888
parent child
Show More
@@ -711,14 +711,14 void VisualizationGraphWidget::onRangeChanged(const QCPRange &t1, const QCPRange
711 }
711 }
712 emit requestDataLoading(std::move(variableUnderGraphVector), graphRange,
712 emit requestDataLoading(std::move(variableUnderGraphVector), graphRange,
713 !impl->m_IsCalibration);
713 !impl->m_IsCalibration);
714 }
714
715
715 if (!impl->m_IsCalibration) {
716 if (impl->m_Flags.testFlag(GraphFlag::EnableSynchronization) && !impl->m_IsCalibration) {
716 qCDebug(LOG_VisualizationGraphWidget())
717 qCDebug(LOG_VisualizationGraphWidget())
717 << tr("TORM: VisualizationGraphWidget::Synchronize notify !!")
718 << tr("TORM: VisualizationGraphWidget::Synchronize notify !!")
718 << QThread::currentThread()->objectName() << graphRange << oldGraphRange;
719 << QThread::currentThread()->objectName() << graphRange << oldGraphRange;
719 emit synchronize(graphRange, oldGraphRange);
720 emit synchronize(graphRange, oldGraphRange);
720 }
721 }
721 }
722
722
723 auto pos = mapFromGlobal(QCursor::pos());
723 auto pos = mapFromGlobal(QCursor::pos());
724 auto axisPos = impl->posToAxisPos(pos, plot());
724 auto axisPos = impl->posToAxisPos(pos, plot());
@@ -733,6 +733,9 void VisualizationGraphWidget::onRangeChanged(const QCPRange &t1, const QCPRange
733 else {
733 else {
734 qCWarning(LOG_VisualizationGraphWidget()) << "onMouseMove: No parent zone widget";
734 qCWarning(LOG_VisualizationGraphWidget()) << "onMouseMove: No parent zone widget";
735 }
735 }
736
737 // Quits calibration
738 impl->m_IsCalibration = false;
736 }
739 }
737
740
738 void VisualizationGraphWidget::onMouseDoubleClick(QMouseEvent *event) noexcept
741 void VisualizationGraphWidget::onMouseDoubleClick(QMouseEvent *event) noexcept
@@ -917,8 +920,6 void VisualizationGraphWidget::onMouseRelease(QMouseEvent *event) noexcept
917
920
918 impl->endDrawingZone(this);
921 impl->endDrawingZone(this);
919
922
920 impl->m_IsCalibration = false;
921
922 // Selection / Deselection
923 // Selection / Deselection
923 auto isSelectionZoneMode
924 auto isSelectionZoneMode
924 = sqpApp->plotsInteractionMode() == SqpApplication::PlotsInteractionMode::SelectionZones;
925 = sqpApp->plotsInteractionMode() == SqpApplication::PlotsInteractionMode::SelectionZones;
@@ -59,7 +59,9 void RescaleAxeOperation::visit(VisualizationGraphWidget *graphWidget)
59 if (graphWidget) {
59 if (graphWidget) {
60 // If the widget contains the variable, rescale it
60 // If the widget contains the variable, rescale it
61 if (impl->m_Variable && graphWidget->contains(*impl->m_Variable)) {
61 if (impl->m_Variable && graphWidget->contains(*impl->m_Variable)) {
62 graphWidget->setFlags(GraphFlag::DisableAll);
62 // During rescale, acquisition for the graph is disabled but synchronization is still
63 // enabled
64 graphWidget->setFlags(GraphFlag::EnableSynchronization);
63 graphWidget->setGraphRange(impl->m_Range);
65 graphWidget->setGraphRange(impl->m_Range);
64 graphWidget->setFlags(GraphFlag::EnableAll);
66 graphWidget->setFlags(GraphFlag::EnableAll);
65 }
67 }
General Comments 0
You need to be logged in to leave comments. Login now