From 22ded03dcb6ae595b79d1c65e78d1f04eb4b73f7 Mon Sep 17 00:00:00 2001 From: "DESKTOP-450PEFP\\mainc" Date: Wed, 17 Jun 2026 14:05:32 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=8A=A0=E8=BD=BD=E5=8F=AF=E8=A7=86=E8=A7=A3?= =?UTF-8?q?=E9=87=8A=E6=A8=A1=E7=89=88=EF=BC=8C=E6=89=B9=E9=87=8F=E6=9B=B2?= =?UTF-8?q?=E7=BA=BF=E6=B2=A1=E6=9C=89=E5=8A=A0=E8=BD=BD=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82=202,=E4=BF=AE=E6=94=B9=E4=B8=8D?= =?UTF-8?q?=E9=94=81=E5=A4=B4=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=EF=BC=8C?= =?UTF-8?q?=E6=8B=96=E6=8B=BD=E6=BB=9A=E5=8A=A8=E6=9D=A1=E6=B8=B2=E6=9F=93?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/CallManage.h | 2 +- logPlus/formdraw.cpp | 12 ++-- logPlus/formimage.cpp | 10 +-- logPlus/formimage.h | 3 +- logPlus/formwave.cpp | 14 ++-- logPlus/formwave.h | 3 +- logPlus/formwell.cpp | 3 +- logPlus/mainwindow.cpp | 2 +- logPlus/mainwindowcurve.cpp | 137 ++++++++++++++++++++++++++++++++---- logPlus/mainwindowcurve.h | 2 +- logPlus/qmycustomplot.cpp | 8 ++- 11 files changed, 159 insertions(+), 37 deletions(-) diff --git a/logPlus/CallManage.h b/logPlus/CallManage.h index 86f54e5..1c53d8a 100644 --- a/logPlus/CallManage.h +++ b/logPlus/CallManage.h @@ -25,7 +25,7 @@ signals: void sig_Open(); void sig_ResizeHeight(QString strUuid, int nHei); - void sig_ResizeDepth(QString strUuid, int nHei, float fDepthLowerY); + void sig_ResizeDepth(QString strUuid, int nHei, float fDepthUpperY, float fDepthLowerY); void sig_Risize(); void sig_AddOne(); void sig_AddLine(int indexID); diff --git a/logPlus/formdraw.cpp b/logPlus/formdraw.cpp index 2f3f5ad..3752fd9 100644 --- a/logPlus/formdraw.cpp +++ b/logPlus/formdraw.cpp @@ -197,7 +197,7 @@ void FormDraw::setDrawData(QStringList listdt, QJsonObject objInfo) curv->setDepthY(m_iY1, m_iY2); curv->initGeometry(m_strUuid, m_iScale, dW); // ===== 性能优化: 开启批量模式, 推迟 replot 到 DisplayLines 完成 ===== - curv->beginBatchLoad(); + //curv->beginBatchLoad(); curv->show(); if ("tdtObject" == strType) @@ -3252,7 +3252,7 @@ QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QStri curv->setDepthY(m_iY1, m_iY2); curv->initGeometry(m_strUuid, m_iScale, m_nTrackW); // ===== 性能优化: 开启批量模式, 推迟 replot ===== - curv->beginBatchLoad(); + //curv->beginBatchLoad(); curv->show(); if (strLineName == "FRAC_HOLE.TABLE") @@ -3566,7 +3566,7 @@ void FormDraw::s_addLine(QString strUuid, QString strSlfName, QString strWellNam } // - QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName); + QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName, "curveObject"); //绑定m_formTrack,方便关联formInfo curv->m_formTrack = m_formTrack; m_curv = curv; @@ -3605,10 +3605,10 @@ void FormDraw::s_AddLine_Property(QString strUuid, QString strSlfName, QString s } // - QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName); + QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName, "curveObject"); //绑定m_formTrack,方便关联formInfo curv->m_formTrack = m_formTrack; - curv->beginBatchLoad(); + //curv->beginBatchLoad(); curv->show(); initForm(curv, strSlfName, strLineName, newLeftScale, newRightScale, strScaleType, lineColor, width, lineStyle, listOtherProperty); @@ -5118,7 +5118,7 @@ void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLi widget->yAxis->setScaleType(QCPAxis::stLinear); } // 加入曲线列表 - m_vecCurv << widget; + //m_vecCurv << widget; if (m_formTrack == NULL) return; diff --git a/logPlus/formimage.cpp b/logPlus/formimage.cpp index 8f3d76f..f9bffd9 100644 --- a/logPlus/formimage.cpp +++ b/logPlus/formimage.cpp @@ -33,7 +33,7 @@ FormImage::FormImage(QWidget *parent, QString strSlfName, QString strWellName, Q //connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_santu_Print(QString, int, int)), this, SLOT(vertScrollBarChanged_Print(QString, int, int))); connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged(QString, double, double, double)), this, SLOT(vertScrollBarChanged(QString, double, double, double))); connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_setGeometry(QString, double, double, double, double)), this, SLOT(vertScrollBarChanged_setGeometry(QString, double, double, double, double))); - connect(CallManage::getInstance(), SIGNAL(sig_ResizeDepth(QString, int, float)), this, SLOT(s_ResizeDepth(QString, int, float))); + connect(CallManage::getInstance(), SIGNAL(sig_ResizeDepth(QString, int, float, float)), this, SLOT(s_ResizeDepth(QString, int, float, float))); //黑白图 connect(CallManage::getInstance(), SIGNAL(sig_changeBlack(QString, bool)), this, SLOT(s_changeBlack(QString, bool))); } @@ -293,14 +293,14 @@ void FormImage::paintEvent(QPaintEvent*) } -void FormImage::s_ResizeDepth(QString strUuid, int nHeight, float fDepthLowerY) +void FormImage::s_ResizeDepth(QString strUuid, int nHeight, float fDepthUpperY, float fDepthLowerY) { if (m_strUuid != strUuid) return; - - this->setFixedHeight(nHeight); + //m_fTopY = fDepthUpperY; + this->setFixedHeight(nHeight * m_nbb); m_fDepthLowerY = qAbs(fDepthLowerY); - m_fAddY = m_fDepthLowerY - m_fTopY; + m_fAddY = (m_fDepthLowerY - m_fTopY) * m_nbb; } void FormImage::s_changeBlack(QString strUuid, bool bBlack) diff --git a/logPlus/formimage.h b/logPlus/formimage.h index 23e2ce3..cd9ec44 100644 --- a/logPlus/formimage.h +++ b/logPlus/formimage.h @@ -95,6 +95,7 @@ public: float m_fDepthLowerY = 0.0f; float m_fAddY = 29.0f; + int m_nbb = 3; int schemIndex = 1; int colornum = 256; // 黑白图 @@ -103,7 +104,7 @@ public: //void DrawWave(QPainter* pdc, QRectF mrt1); public slots: - void s_ResizeDepth(QString strUuid, int nHeight, float fDepthLowerY); + void s_ResizeDepth(QString strUuid, int nHeight, float fDepthUpperY, float fDepthLowerY); // 黑白图 void s_changeBlack(QString strUuid, bool bBlack); diff --git a/logPlus/formwave.cpp b/logPlus/formwave.cpp index ba518a8..b2b2ef1 100644 --- a/logPlus/formwave.cpp +++ b/logPlus/formwave.cpp @@ -49,7 +49,7 @@ FormWave::FormWave(QWidget *parent, QString strSlfName, QString strWellName, QSt //connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_santu_Print(QString, int, int)), this, SLOT(vertScrollBarChanged_Print(QString, int, int))); connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged(QString, double, double, double)), this, SLOT(vertScrollBarChanged(QString, double, double, double))); connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_setGeometry(QString, double, double, double, double)), this, SLOT(vertScrollBarChanged_setGeometry(QString, double, double, double, double))); - connect(CallManage::getInstance(), SIGNAL(sig_ResizeDepth(QString, int, float)), this, SLOT(s_ResizeDepth(QString, int, float))); + connect(CallManage::getInstance(), SIGNAL(sig_ResizeDepth(QString, int, float, float)), this, SLOT(s_ResizeDepth(QString, int, float, float))); //黑白图 connect(CallManage::getInstance(), SIGNAL(sig_changeBlack(QString, bool)), this, SLOT(s_changeBlack(QString, bool))); } @@ -96,6 +96,8 @@ void FormWave::setDepthY(float fy1, float fy2) void FormWave::updateDepthY(float fy1, float fy2) { + qDebug() << "FormWave::updateDepthY->" << fy1 << ":" << fy2; + this->m_iY1 = fy1; this->m_iY2 = fy2; m_fTopY = qAbs(this->m_iY2); @@ -316,14 +318,14 @@ void FormWave::paintEvent(QPaintEvent*) } -void FormWave::s_ResizeDepth(QString strUuid, int nHeight, float fDepthLowerY) +void FormWave::s_ResizeDepth(QString strUuid, int nHeight, float fDepthUpperY, float fDepthLowerY) { if (m_strUuid != strUuid) return; - - this->setFixedHeight(nHeight); + //m_fTopY = qAbs(fDepthUpperY); + this->setFixedHeight(nHeight*m_nbb); m_fDepthLowerY = qAbs(fDepthLowerY); - m_fAddY = m_fDepthLowerY - m_fTopY; + m_fAddY = (m_fDepthLowerY - m_fTopY) * m_nbb; } void FormWave::s_changeBlack(QString strUuid, bool bBlack) @@ -525,8 +527,6 @@ void FormWave::DrawWave(QPainter* pdc, QRectF mrt1) float ddep = (y1 - y0); rt = mrt; - QRectF rtd = mrt; - QRectF tt; if (m_flRlev2 <= 0) m_flRlev2 = 0.1; int Mode = m_pInfo->m_nCurveMode;// objViewInfo->GetLogarithmic(); //objViewInfo->m_Rlev = waveinfo.DepLevel; diff --git a/logPlus/formwave.h b/logPlus/formwave.h index 385dad9..a40ca50 100644 --- a/logPlus/formwave.h +++ b/logPlus/formwave.h @@ -95,6 +95,7 @@ public: float m_fDepthLowerY = 0.0f; float m_fAddY = 19.0f; + int m_nbb = 3; int schemIndex = 1; int colornum = 256; // 黑白图 @@ -103,7 +104,7 @@ public: //void DrawWave(QPainter* pdc, QRectF mrt1); public slots: - void s_ResizeDepth(QString strUuid, int nHeight, float fDepthLowerY); + void s_ResizeDepth(QString strUuid, int nHeight, float fDepthUpperY, float fDepthLowerY); // 黑白图 void s_changeBlack(QString strUuid, bool bBlack); //斜井三图一表 diff --git a/logPlus/formwell.cpp b/logPlus/formwell.cpp index 7b9edc7..e85653e 100644 --- a/logPlus/formwell.cpp +++ b/logPlus/formwell.cpp @@ -751,6 +751,7 @@ int FormWell::setColWidth_ZoomIn(float fNewZoom) return iWellWidth; } + void FormWell::setWellProperty(QVariantList listVal) { QString strGroup = listVal.at(0).toString(); @@ -772,7 +773,7 @@ void FormWell::setWellProperty(QVariantList listVal) ui->tableWidget->hideRow(0); ui->tableWidget->update(); } - //m_pMainWinCurve->SetScrollBar_Geometry(); + m_pMainWinCurve->SetScrollBar_Geometry(); } return; } diff --git a/logPlus/mainwindow.cpp b/logPlus/mainwindow.cpp index 9c72121..20e1752 100644 --- a/logPlus/mainwindow.cpp +++ b/logPlus/mainwindow.cpp @@ -258,7 +258,7 @@ void MainWindow::initTitleBar() { QMenuBar* m_MenuBar = this->menuBar(); m_MenuBar->setStyleSheet("QMenuBar{font-size: 10.5pt; min-height:28px;}"); - m_MenuBar->hide(); + //m_MenuBar->hide(); // QMenu* m_projectMenu = this->menuBar()->addMenu(tr("工区管理(&F)")); //添加子菜单 diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index 84e11af..6c1bb99 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -394,8 +394,9 @@ void MainWindowCurve::SetScrollBar_Geometry_ByHand() m_iTableSize_Head2 = iTableSize_Head2; m_nObjLayerH = m_iTableSize_Head2; + double topDep = getVisibleTopDepth(); m_dBottomDepth = this->getVisibleBottomDepth(); - emit CallManage::getInstance()->sig_ResizeDepth(m_strUuid, m_nObjDrawH, m_dBottomDepth); + emit CallManage::getInstance()->sig_ResizeDepth(m_strUuid, m_nObjDrawH, topDep, m_dBottomDepth); ui->verticalScrollBar_2->setRange(0, iTableSize_Head_Biggest - iTableSize_Head); ui->verticalScrollBar_2->setValue(0); @@ -534,8 +535,9 @@ MainWindowCurve::~MainWindowCurve() void MainWindowCurve::resizeEvent(QResizeEvent *event) { + double topDep = getVisibleTopDepth(); m_dBottomDepth = this->getVisibleBottomDepth(); - emit CallManage::getInstance()->sig_ResizeDepth(m_strUuid, m_nObjDrawH, m_dBottomDepth); + emit CallManage::getInstance()->sig_ResizeDepth(m_strUuid, m_nObjDrawH, topDep, m_dBottomDepth); emit sig_resizeWindow(); @@ -640,6 +642,7 @@ void MainWindowCurve::vertScrollBarChanged(int iValue) { double value = (double)iValue/100; + qDebug() << "#MainWindowCurve::vertScrollBarChanged " << value; //AppendConsole(PAI_INFO, "鼠标滚动开始"); double low = -m_iY1; double upper = -m_iY2; @@ -696,6 +699,7 @@ void MainWindowCurve::vertScrollBarChanged(int iValue) { iNumShow++; } + if(m_iCurPage == iNumShow) { double iCurValue = dDelta - (double)(iNumShow-1)*dScrollHeight; @@ -753,6 +757,12 @@ void MainWindowCurve::vertScrollBarChanged(int iValue) emit CallManage::getInstance()->sig_vertScrollBarChanged(m_strUuid, iCurValue, -m_iY1, -m_iY2);//(iNumShow-1)*dScrollHeight_setGeometry // 修复滚动跳动: 翻页时同步发送 setGeometry 信号 double iCurValue_setGeom = dDelta - (double)(iNumShow-1)*dScrollHeight; + if (m_iCurPage == 1) + { + int iTableWellTrack_height = ui->tableWidget_2->rowHeight(0) + (5) + iTableSize_Head - 1; + double headerDepth = (double)iTableWellTrack_height * (double)m_iScale / (100.0 * g_dPixelPerCm); // 米 + iCurValue_setGeom = /*dDelta -*/ headerDepth;// / (abs(m_iY1) - abs(m_iY2)); + } emit CallManage::getInstance()->sig_vertScrollBarChanged_setGeometry(m_strUuid, iCurValue_setGeom, dScrollHeight_setGeometry, 0, value); } else if(value==upper) @@ -778,31 +788,127 @@ void MainWindowCurve::vertScrollBarChanged(int iValue) emit CallManage::getInstance()->sig_vertScrollBarChanged_setGeometry(m_strUuid, 0, dScrollHeight_setGeometry, 0, value); } - + //if (!m_fixwellsectionHeaderAc->isChecked()) + //{ + // double topDep = getVisibleTopDepth(); + // m_dBottomDepth = this->getVisibleBottomDepth(); + // qDebug() << " ## getVisibleTopDepth==" << topDep; + // //emit CallManage::getInstance()->sig_ResizeDepth(m_strUuid, m_nObjDrawH, topDep, m_dBottomDepth); + //} //通知界面重设范围(三图一表) emit CallManage::getInstance()->sig_vertScrollBarChanged_santuyibiao(m_strUuid, value, -m_iY1, -m_iY2); //AppendConsole(PAI_INFO, "鼠标滚动结束"); } // 获取 centralwidget 可视区域顶部深度(米) -// 原理:滚动条值 value = -(当前顶部深度), 即 topDepth = -value -double MainWindowCurve::getVisibleTopDepth() const +// 深度坐标约定: +// m_iY1 负值表示深端(如 -1000 = 1000m),m_iY2 负值表示浅端(如 0 = 0m) +// verticalScrollBar range = [0, 100000],value 越大表示越深 +// topDepth(米) = value / 100(正数) +double MainWindowCurve::getVisibleTopDepth() { double value = (double)ui->verticalScrollBar->value() / 100.0; - return -value; // 顶部深度(浅端,较小值) + + if (!m_fixwellsectionHeaderAc->isChecked()) + { + // 不锁头模式:直接用 tableWidget_2 的实际滚动位置计算 + // 不依赖外层 value 和 tableWidget_2 滚动之间的映射关系 + if (m_iCurPage > 1) + { + // 第2页以上:外层 value 直接是该页起始深度,已验证正确 + return value; + } + else + { + // 第1页:用外层滚动条 value 直接计算,不依赖 tableWidget_2 内部滚动 + // 不锁头第1页时,value 就是可视区域顶部的深度 + // 当头部(iTableWellTrack_height)还在可视区域内时,数据区顶部深度 = upper + // 当头部滚出后,数据区顶部深度随滚动增加 + double upper = (double)(-m_iY2); + double value = (double)ui->verticalScrollBar->value() / 100.0; + + // 使用与 vertScrollBarChanged 中相同的头部高度计算 + int iTableSize_Head = 100 + m_nObjLayerH; + if(!m_bShowTrackHead) + { + iTableSize_Head = m_nObjLayerH; + } + int headerPx = ui->tableWidget_2->rowHeight(0) + 5 + iTableSize_Head - 1; + double headerDepth = (double)headerPx * (double)m_iScale / (100.0 * g_dPixelPerCm); // 米 + double scrollOffset = value - upper; // 从最浅端开始的滚动深度(米) + + if (scrollOffset <= headerDepth) + { + // 头部还在可见区域,数据区顶部 = 最浅端(头部遮挡了数据区顶部) + return upper; + } + else + { + // 头部已滚出,数据区顶部 = 最浅端 + (scrollOffset - headerDepth) + double result = upper + (scrollOffset - headerDepth); + return result; + } + } + } + + // 锁头模式:value 直接是顶部深度 + return value; } // 获取 centralwidget 可视区域底部深度(米) -// 原理:bottomDepth = topDepth + 可视高度(深度单位) +// 同时更新 m_nObjDrawH 为精确的绘图区域像素高度(扣除可见头部) double MainWindowCurve::getVisibleBottomDepth() { - double value = (double)ui->verticalScrollBar->value() / 100.0; - double topDepth = -value; + double topDepth = getVisibleTopDepth(); + + if (!m_fixwellsectionHeaderAc->isChecked() && m_iCurPage <= 1) + { + // 不锁头第1页:精确计算可见绘图区域的深度范围 + // 需扣除当前仍可见的头部像素,因为头部不显示数据 + QRect rect2 = ui->centralwidget->geometry(); + int left = 0, top = 0, right = 0, bottom = 0; + if (ui->centralwidget->layout()) + ui->centralwidget->layout()->getContentsMargins(&left, &top, &right, &bottom); + + // 使用与 vertScrollBarChanged 中相同的头部高度计算 + int iTableSize_Head = 100 + m_nObjLayerH; + if(!m_bShowTrackHead) + { + iTableSize_Head = m_nObjLayerH; + } + int headerPx = ui->tableWidget_2->rowHeight(0) + 5 + iTableSize_Head - 1; + double headerDepth = (double)headerPx * (double)m_iScale / (100.0 * g_dPixelPerCm); // 米 + + double value = (double)ui->verticalScrollBar->value() / 100.0; + double upper = (double)(-m_iY2); + double scrollOffset = value - upper; // 从最浅端开始的滚动深度(米) + + int screenDrawPx = rect2.height() - 10 - top - bottom - 4; + double screenDrawDepth = (double)screenDrawPx * (double)m_iScale / (100.0 * g_dPixelPerCm); // 米 + + // 道头还有多少深度没滚出 + double remainingHeaderDepth = qMax(0.0, headerDepth - scrollOffset); + // 屏幕上可见的道头深度(不超过屏幕深度) + double visibleHeaderDepth = qMin(screenDrawDepth, remainingHeaderDepth); + // 数据区实际显示深度 + double dataDepthRange = qMax(0.0, screenDrawDepth - visibleHeaderDepth); + + // m_nObjDrawH 是像素值,由 dataDepthRange 转回像素 + m_nObjDrawH = (int)(dataDepthRange * 100.0 * g_dPixelPerCm / (double)m_iScale); +// qDebug() << "#getVisibleBottomDepth[page1]: value=" << value +// << "scrollOffset=" << scrollOffset +// << "headerPx=" << headerPx +// << "headerDepth=" << headerDepth +// << "visibleHeaderDepth=" << visibleHeaderDepth +// << "dataDepthRange=" << dataDepthRange +// << "m_nObjDrawH=" << m_nObjDrawH; + return topDepth + dataDepthRange; + } int iScreenHeight = getScreenHeight(); // iScreenHeight 单位是 0.01m,除以100转为米 double visibleDepthRange = (double)iScreenHeight / 100.0; - return topDepth - visibleDepthRange; + return topDepth + visibleDepthRange; } int MainWindowCurve::getScreenHeight() @@ -4614,8 +4720,9 @@ void MainWindowCurve::s_hvDraw() { restoreOriginalCentralWidget(); } + double topDep = getVisibleTopDepth(); m_dBottomDepth = this->getVisibleBottomDepth(); - emit CallManage::getInstance()->sig_ResizeDepth(m_strUuid, m_nObjDrawH, m_dBottomDepth); + emit CallManage::getInstance()->sig_ResizeDepth(m_strUuid, m_nObjDrawH, topDep, m_dBottomDepth); } //显示/隐藏图头 @@ -4729,6 +4836,10 @@ void MainWindowCurve::s_showHeadTable() } + + double topDep = getVisibleTopDepth(); + m_dBottomDepth = this->getVisibleBottomDepth(); + emit CallManage::getInstance()->sig_ResizeDepth(m_strUuid, m_nObjDrawH, topDep, m_dBottomDepth); } QJsonObject MainWindowCurve::makeJson() @@ -6317,8 +6428,9 @@ void MainWindowCurve::s_changeDepth(QString strUuid, QString strSlfName, QString //设置高度 //jyl ui->tableWidget_2->setRowHeight(1, (int)dHightOne); + double topDep = getVisibleTopDepth(); m_dBottomDepth = this->getVisibleBottomDepth(); - emit CallManage::getInstance()->sig_ResizeDepth(m_strUuid, m_nObjDrawH, m_dBottomDepth); + emit CallManage::getInstance()->sig_ResizeDepth(m_strUuid, m_nObjDrawH, topDep, m_dBottomDepth); // progressBar->deleteLater(); //update(); @@ -7187,6 +7299,7 @@ void MainWindowCurve::ShowTableHead_All() int iTableSize_Head1 = 0; int iTableSize_Head2 = 0; getTableSize_Head_Biggest(iTableSize_Head_Biggest, iTableSize_Head1, iTableSize_Head2); + m_nObjLayerH = iTableSize_Head_Biggest - iTableSize_Head1; // int columnCount = ui->tableWidget_2->columnCount();//总列数 for(int i=0; im_cuPen; m_zhongPen = m_formDraw->m_zhongPen; m_xiPen = m_formDraw->m_xiPen; - m_formDraw->addCusPlot(this); + + if (m_strType == "curveObject") + { + m_formDraw->addCusPlot(this); + } } mSizeHandleManager = new QCPSizeHandleManager(this); @@ -10819,6 +10823,7 @@ void QMyCustomPlot::setDepthY(float fy1, float fy2) void QMyCustomPlot::updateDepthY(float fy1, float fy2) { + qDebug() << "QMyCustomPlot::updateDepthY->" << fy1 << ":" << fy2; this->m_iY1 = fy1; this->m_iY2 = fy2; m_fTopY = fy2; @@ -12349,6 +12354,7 @@ void QMyCustomPlot::vertScrollBarChanged(QString strUuid, double value, double l { return; } + qDebug() << " ##############vertScrollBarChanged " << low << "," << upper; // NOTE: 不在此处 setGeometry(0,0,...), 由 vertScrollBarChanged_setGeometry 统一管理位置 FormInfo* pInfo = m_formTrack->getFormInfoByParameters(m_strUuid, m_strWellName, m_strTrackName, m_strLineName); if (pInfo == NULL)