Fix problem with black background in snapshot export

This commit is contained in:
Gaute Lindkvist
2020-01-08 14:52:28 +01:00
parent 3fc7378b8f
commit a58d854030
11 changed files with 44 additions and 27 deletions

View File

@@ -215,7 +215,6 @@ public:
}
else if ( firstCurveData->depthUnit() == RiaDefines::UNIT_NONE )
{
CVF_ASSERT( false );
lasFile->AddLog( "DEPTH",
"",
"Depth in Connection number",
@@ -269,10 +268,6 @@ public:
{
lasFile->setDepthUnit( "FT" );
}
else if ( firstCurveData->depthUnit() == RiaDefines::UNIT_NONE )
{
CVF_ASSERT( false );
}
double absentValue = SingleLasFileMetaData::createAbsentValue( m_minimumCurveValue );
lasFile->SetMissing( absentValue );
@@ -387,7 +382,8 @@ void RigLasFileExporter::setRkbDiffs( const std::vector<QString>& wellNames, con
//--------------------------------------------------------------------------------------------------
std::vector<QString> RigLasFileExporter::writeToFolder( const QString& exportFolder,
const QString& filePrefix /*= ""*/,
bool capitalizeFileName /*= false*/ )
bool capitalizeFileName /*= false*/,
bool alwaysOverwrite /*= false*/ )
{
std::vector<QString> writtenFiles;
@@ -413,7 +409,7 @@ std::vector<QString> RigLasFileExporter::writeToFolder( const QString& exportFol
fileName = fileName.toUpper();
}
QString fullPathName = dir.absoluteFilePath( fileName );
if ( caf::Utils::fileExists( fullPathName ) )
if ( caf::Utils::fileExists( fullPathName ) && !alwaysOverwrite )
{
QString txt = QString( "File %1 exists.\n\nDo you want to overwrite the file?" ).arg( fullPathName );
int ret = QMessageBox::question( nullptr,

View File

@@ -38,8 +38,10 @@ public:
void wellPathsAndRkbDiff( std::vector<QString>* wellNames, std::vector<double>* rkbDiffs );
void setRkbDiffs( const std::vector<QString>& wellNames, const std::vector<double>& rkbDiffs );
std::vector<QString>
writeToFolder( const QString& exportFolder, const QString& filePrefix = "", bool capitalizeFileName = false );
std::vector<QString> writeToFolder( const QString& exportFolder,
const QString& filePrefix = "",
bool capitalizeFileName = false,
bool alwaysOverwrite = false );
private:
std::vector<SingleLasFileMetaData> createLasFileDescriptions( const std::vector<RimWellLogCurve*>& curves );