From 036a18d0837d4312ed4c04ac2c617f191f17a8a5 Mon Sep 17 00:00:00 2001 From: jiayulong Date: Tue, 19 May 2026 13:45:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=8A=A0=E8=BD=BD=E8=A7=86?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E5=A4=84=E7=90=86=E6=BB=9A=E5=8A=A8=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/mainwindowcurve.cpp | 6 ++++++ logPlus/qmycustomplot.cpp | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index 3041135..aaadb64 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -54,6 +54,8 @@ extern int g_iDebug; //SmallPrint extern int g_iSmallPrint; +int g_iLoadingJson = 0; + MainWindowCurve::MainWindowCurve(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindowCurve) @@ -4655,8 +4657,12 @@ void MainWindowCurve::Open(QString fileFull) if (value.isArray()) { wellsArray = value.toArray(); qDebug() << "wellsArray number:" << QString::number(wellsArray.size()); + + //是否正在加载json + g_iLoadingJson = 1; //展示所有井 DisplayWells(wellsArray); + g_iLoadingJson = 0; } } // diff --git a/logPlus/qmycustomplot.cpp b/logPlus/qmycustomplot.cpp index 53b296b..3184ed6 100644 --- a/logPlus/qmycustomplot.cpp +++ b/logPlus/qmycustomplot.cpp @@ -36,6 +36,7 @@ extern double g_dPixelPerCm;//每厘米像素数 extern double g_SDepthFac; extern double g_EDepthFac; extern QString g_SelectMFac; +extern int g_iLoadingJson; QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strType) : QCustomPlot(parent) @@ -273,8 +274,11 @@ void QMyCustomPlot::initGeometry(QString strUuid, int nscale, double fW) int ntmpw = fW * g_dPixelPerCm; this->setGeometry(0, 0, ntmpw - 2, (int)dHight); - //修改滚动条,针对新建的 - emit CallManage::getInstance()->sig_changeScrollBar(m_strUuid); + if(g_iLoadingJson==0)//针对模板加载,不处理滚动条,避免多次冲突 + { + //修改滚动条,针对新建的 + emit CallManage::getInstance()->sig_changeScrollBar(m_strUuid); + } } void QMyCustomPlot::changePropertyWaveUpdate()