|
|
|
@ -612,7 +612,8 @@ void nmWxSensitivityScatter::updateThreshold()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// 阈值以下的点填黑,并同步图例中的阈值显示。
|
|
|
|
// 阈值以下的点填黑,并同步图例中的阈值显示。
|
|
|
|
if(m_parameter->currentIndex() < 0) return;
|
|
|
|
if(m_parameter->currentIndex() < 0) return;
|
|
|
|
if(m_results->m_dFilterThreshold != m_threshold) {
|
|
|
|
// 拖动时只更新图内反馈,松开后再保存阈值并刷新结果面板。
|
|
|
|
|
|
|
|
if(!m_draggingThreshold && m_results->m_dFilterThreshold != m_threshold) {
|
|
|
|
m_results->m_dFilterThreshold = m_threshold;
|
|
|
|
m_results->m_dFilterThreshold = m_threshold;
|
|
|
|
emit filterChanged();
|
|
|
|
emit filterChanged();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -699,8 +700,8 @@ bool nmWxSensitivityScatter::eventFilter(QObject* object, QEvent* event)
|
|
|
|
m_plot->m_pPlot->getInnerRectF().contains(scene) && qAbs(mouse->pos().y() - lineY) <= 6.0) m_draggingThreshold = true;
|
|
|
|
m_plot->m_pPlot->getInnerRectF().contains(scene) && qAbs(mouse->pos().y() - lineY) <= 6.0) m_draggingThreshold = true;
|
|
|
|
if(m_draggingThreshold) {
|
|
|
|
if(m_draggingThreshold) {
|
|
|
|
m_threshold = qBound(0.0, axisY->getValueForPos(scene.y()), axisY->getRangeMax());
|
|
|
|
m_threshold = qBound(0.0, axisY->getValueForPos(scene.y()), axisY->getRangeMax());
|
|
|
|
updateThreshold();
|
|
|
|
|
|
|
|
if(event->type() == QEvent::MouseButtonRelease) m_draggingThreshold = false;
|
|
|
|
if(event->type() == QEvent::MouseButtonRelease) m_draggingThreshold = false;
|
|
|
|
|
|
|
|
updateThreshold();
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|