diff --git a/Src/nmNum/nmSubWxs/nmWxPerforationClosing.cpp b/Src/nmNum/nmSubWxs/nmWxPerforationClosing.cpp index 97c78797..943650c2 100644 --- a/Src/nmNum/nmSubWxs/nmWxPerforationClosing.cpp +++ b/Src/nmNum/nmSubWxs/nmWxPerforationClosing.cpp @@ -494,12 +494,18 @@ void nmWxPerforationClosing::onRemoveClicked() qSort(timeValuesInHr.begin(), timeValuesInHr.end()); - if(hasSelection && selectedIndex >= 0 && selectedIndex < timeValuesInHr.size()) { - timeValuesInHr.removeAt(selectedIndex); - } else if(!timeValuesInHr.isEmpty()) { - timeValuesInHr.removeLast(); + // 未选中具体事件时,沿用删除末尾事件的入口。 + if(!hasSelection || selectedIndex < 0 || selectedIndex >= timeValuesInHr.size()) { + selectedIndex = timeValuesInHr.size() - 1; } + // 按Saphir的行操作规则删除当前行及下一行,先删下一行以免索引移位。 + if(selectedIndex + 1 < timeValuesInHr.size()) { + timeValuesInHr.removeAt(selectedIndex + 1); + } + // 当前行位于末尾时,只删除自身。 + timeValuesInHr.removeAt(selectedIndex); + m_baseTimeValues = timeValuesInHr; if(m_baseTimeValues.isEmpty()) { diff --git a/Src/nmNum/nmSubWxs/nmWxPressFlowChartWidget.cpp b/Src/nmNum/nmSubWxs/nmWxPressFlowChartWidget.cpp index 9c8a25cc..e942067e 100644 --- a/Src/nmNum/nmSubWxs/nmWxPressFlowChartWidget.cpp +++ b/Src/nmNum/nmSubWxs/nmWxPressFlowChartWidget.cpp @@ -564,35 +564,24 @@ void nmWxPressFlowChartWidget::drawSelectedFlowSegments(QPainter& painter) } } - // 2. 绘制所有流动段的边界线(蓝色) + // 2. 只绘制各流动段的起点边界线,不额外绘制末尾终点(蓝色) painter.setPen(QPen(QColor(0, 0, 255), 2)); // 蓝色,2像素宽 for(int i = 0; i < segments.size(); ++i) { const FlowSegmentData& segment = segments[i]; double startTime = segment.segmentStart.getValue().toDouble(); - double endTime = segment.segmentEnd.getValue().toDouble(); // 如果是外部拖动状态,并且是被拖动的边界,使用拖动中的时间 if(m_externalDragActive && i == m_externalDragBoundaryIndex) { startTime = m_externalDragBoundaryTime; } - // 检查下一个段是否受到拖动影响 - if(m_externalDragActive && i + 1 < segments.size() && (i + 1) == m_externalDragBoundaryIndex) { - endTime = m_externalDragBoundaryTime; - } - // 检查是否处于合并状态 // 转换为屏幕坐标 int leftX = m_plotArea.left() + (startTime - m_minX) / (m_maxX - m_minX) * m_plotArea.width(); // 绘制起点边界线 painter.drawLine(leftX, m_plotArea.top(), leftX, m_plotArea.bottom()); - // 只有最后一个段画终点 - if (i == segments.size() - 1) { - int rightX = m_plotArea.left() + (endTime - m_minX) / (m_maxX - m_minX) * m_plotArea.width(); - painter.drawLine(rightX, m_plotArea.top(), rightX, m_plotArea.bottom()); - } } diff --git a/Src/nmNum/nmSubWxs/nmWxTimeDependentSkin.cpp b/Src/nmNum/nmSubWxs/nmWxTimeDependentSkin.cpp index ab867e27..94149fe3 100644 --- a/Src/nmNum/nmSubWxs/nmWxTimeDependentSkin.cpp +++ b/Src/nmNum/nmSubWxs/nmWxTimeDependentSkin.cpp @@ -2133,6 +2133,12 @@ void nmWxTimeDependentSkin::splitAllFlowSegments() if(flowStepBoundaries.isEmpty()) return; + // 末尾关井段沿用前一段表皮,不单独生成分割点;仍保留总时长作为最后一段终点。 + const QVector flowSteps = m_currentWell->getFlowPoints(); + for(int i = flowSteps.size() - 1; i > 0 && qFuzzyIsNull(flowSteps[i].y()); --i) { + flowStepBoundaries.remove(i); + } + // 统一量化 for(int i = 0; i < flowStepBoundaries.size(); ++i) { double sec = toSeconds(flowStepBoundaries[i], "hr");