diff --git a/logPlus/GeoIndicatorGenerator.cpp b/logPlus/GeoIndicatorGenerator.cpp index 54e7fc1..23675c6 100644 --- a/logPlus/GeoIndicatorGenerator.cpp +++ b/logPlus/GeoIndicatorGenerator.cpp @@ -67,6 +67,7 @@ bool GeoIndicatorGenerator::initGeoInf(QString libName, int libNum) if(!file.open(QIODevice::ReadOnly)) return false; QTextStream stream(&file); + stream.setCodec("UTF-8"); // 设置UTF-8编码 QString line; int lineNum = 0; diff --git a/logPlus/GeoIndicatorGenerator.h b/logPlus/GeoIndicatorGenerator.h index 075be76..e058ac2 100644 --- a/logPlus/GeoIndicatorGenerator.h +++ b/logPlus/GeoIndicatorGenerator.h @@ -4,6 +4,8 @@ #include #include #include +#pragma execution_character_set("utf-8") + class GeoIndicatorGenerator { public: diff --git a/logPlus/QtWindowWellSection.cpp b/logPlus/QtWindowWellSection.cpp index 143e069..9417459 100644 --- a/logPlus/QtWindowWellSection.cpp +++ b/logPlus/QtWindowWellSection.cpp @@ -637,9 +637,9 @@ void CQtWindowWellSection::OnListBedValue(QString m_csWellName,QString m_OGTable int m_CoreRecNum=0; for(int j=0;j<4;j++) { - if(j==0) color=cs+"corecolor.ini"; - else if(j==1) color=cs+"corelith.ini"; - else if(j==2) color=cs+"coreoil.ini"; + if(j==0) color=cs+"Corecolor.ini"; + else if(j==1) color=cs+"CoreLith.ini"; + else if(j==2) color=cs+"CoreOil.ini"; else color=cs+"colorind.ini"; FILE *fp=fopen(color.toStdString().c_str(),"rt"); QStringList ss; diff --git a/logPlus/qmycustomplot.cpp b/logPlus/qmycustomplot.cpp index e0b69d3..347f62c 100644 --- a/logPlus/qmycustomplot.cpp +++ b/logPlus/qmycustomplot.cpp @@ -2432,9 +2432,9 @@ bool QMyCustomPlot::SaveToSLF_SwallCore() QString color; for(int j=0;j<4;j++) { - if(j==0) color=cs+"corecolor.ini"; - else if(j==1) color=cs+"corelith.ini"; - else if(j==2) color=cs+"coreoil.ini"; + if(j==0) color=cs+"Corecolor.ini"; + else if(j==1) color=cs+"CoreLith.ini"; + else if(j==2) color=cs+"CoreOil.ini"; else color=cs+"colorind.ini"; FILE *fp=fopen(color.toStdString().c_str(),"rt"); QStringList ss; @@ -3214,9 +3214,9 @@ void QMyCustomPlot::addItem_SWallCore() QString color; for(int j=0;j<4;j++) { - if(j==0) color=cs+"corecolor.ini"; - else if(j==1) color=cs+"corelith.ini"; - else if(j==2) color=cs+"coreoil.ini"; + if(j==0) color=cs+"Corecolor.ini"; + else if(j==1) color=cs+"CoreLith.ini"; + else if(j==2) color=cs+"CoreOil.ini"; else color=cs+"colorind.ini"; FILE *fp=fopen(color.toStdString().c_str(),"rt"); QStringList ss; @@ -3989,9 +3989,9 @@ bool QMyCustomPlot::LoadFromSLF_SwallCore(QString strSlfName, QString strLineNam QString color; for(int j=0;j<4;j++) { - if(j==0) color=cs+"corecolor.ini"; - else if(j==1) color=cs+"corelith.ini"; - else if(j==2) color=cs+"coreoil.ini"; + if(j==0) color=cs+"Corecolor.ini"; + else if(j==1) color=cs+"CoreLith.ini"; + else if(j==2) color=cs+"CoreOil.ini"; else color=cs+"colorind.ini"; FILE *fp=fopen(color.toStdString().c_str(),"rt"); QStringList ss; @@ -7622,7 +7622,10 @@ void QMyCustomPlot::s_changeGeoLithLine(QString strUuid, QString strSlfName, QSt //重新加载 LoadFromSLF_GeoLith(m_strSlfName, m_strLineName); - //不清空属性窗口 + //不清空属性窗口(修改为:对象已失效,需要清空属性) + + //属性清空 + PropertyService()->InitCurrentViewInfo(); } //改变录井剖面属性,是否显示 @@ -7679,7 +7682,10 @@ void QMyCustomPlot::s_changeGeoLithShow(QString strUuid, QString strSlfName, QSt //重新加载 LoadFromSLF_GeoLith(m_strSlfName, m_strLineName); - //不清空属性窗口 + //不清空属性窗口(修改为:对象已失效,需要清空属性) + + //属性清空 + PropertyService()->InitCurrentViewInfo(); } //改变沉积相属性,是否显示 @@ -9513,7 +9519,7 @@ void QMyCustomPlot::ReadFracDef_Fac() { m_FracDef.clear(); - QString fracFilePath = GetConfPath() + "GEoFac.ini"; + QString fracFilePath = GetConfPath() + "GeoFac.ini"; // FAC_DEF fd; @@ -9582,7 +9588,9 @@ void QMyCustomPlot::ReadData_Fac(QString strSlfName, QString csCurve, bool bAdd) if(bAdd) { //微相 - this->addMFacToPlot(-frac.edep, -frac.sdep, QString::fromLocal8Bit(frac.mFac), false); + //QString strMFac = QString::fromLocal8Bit(frac.mFac); + QString strMFac = GBKToUTF8(frac.mFac); + this->addMFacToPlot(-frac.edep, -frac.sdep, strMFac, false); } } mrw.CloseTable(iIndex); @@ -9621,9 +9629,9 @@ void QMyCustomPlot::DrawFac(int iType) FAC_TABLE pObj; pObj =m_ObjList_Fac[0]; if (iType==1) - str1 = QString::fromLocal8Bit(pObj.Fac); + str1 = GBKToUTF8(pObj.Fac);//QString::fromLocal8Bit(pObj.Fac); else - str1 = QString::fromLocal8Bit(pObj.Phase); + str1 = GBKToUTF8(pObj.Phase);//QString::fromLocal8Bit(pObj.Phase); str1.trimmed(); top = pObj.sdep; @@ -9632,9 +9640,9 @@ void QMyCustomPlot::DrawFac(int iType) pObj =m_ObjList_Fac[j]; if (iType==1) - str2= QString::fromLocal8Bit(pObj.Fac); + str2= GBKToUTF8(pObj.Fac);//QString::fromLocal8Bit(pObj.Fac); else - str2 = QString::fromLocal8Bit(pObj.Phase); + str2 = GBKToUTF8(pObj.Phase);//QString::fromLocal8Bit(pObj.Phase); str2.trimmed(); // if (str2!=str1 || j==(m_ObjList_Fac.count()-1))