diff --git a/ApplicationCode/FileInterface/RifEclipseSummaryAddress.h b/ApplicationCode/FileInterface/RifEclipseSummaryAddress.h index e8dd607cf1..fe92655892 100644 --- a/ApplicationCode/FileInterface/RifEclipseSummaryAddress.h +++ b/ApplicationCode/FileInterface/RifEclipseSummaryAddress.h @@ -152,4 +152,4 @@ private: bool operator==(const RifEclipseSummaryAddress& first, const RifEclipseSummaryAddress& second); -bool operator<(const RifEclipseSummaryAddress& first, const RifEclipseSummaryAddress& second); \ No newline at end of file +bool operator<(const RifEclipseSummaryAddress& first, const RifEclipseSummaryAddress& second); diff --git a/ApplicationCode/ProjectDataModel/Summary/RimObservedData.cpp b/ApplicationCode/ProjectDataModel/Summary/RimObservedData.cpp index 6c3fd28226..b98bed85bd 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimObservedData.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimObservedData.cpp @@ -39,7 +39,7 @@ RimObservedData::RimObservedData() m_importedSummaryData.uiCapability()->setUiReadOnly(true); m_importedSummaryData.xmlCapability()->disableIO(); - CAF_PDM_InitFieldNoDefault(&m_useCustomIdentifier, "UseCustomIdentifier", "Use Custom Identifier", "", "", ""); + CAF_PDM_InitField(&m_useCustomIdentifier, "UseCustomIdentifier", false, "Use Custom Identifier", "", "", ""); CAF_PDM_InitField(&m_summaryCategory, "SummaryType", caf::AppEnum(RifEclipseSummaryAddress::SUMMARY_WELL), "Summary Type", "", "", ""); CAF_PDM_InitFieldNoDefault(&m_identifierName, "IdentifierName", "Identifier Name", "", "", ""); } diff --git a/ApplicationCode/ProjectDataModel/Summary/RimObservedDataCollection.cpp b/ApplicationCode/ProjectDataModel/Summary/RimObservedDataCollection.cpp index 02068aab83..090a5f8e47 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimObservedDataCollection.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimObservedDataCollection.cpp @@ -19,14 +19,17 @@ #include "RimObservedDataCollection.h" +#include "RiaApplication.h" #include "RiaLogging.h" #include "RifKeywordVectorParser.h" -#include "RimObservedEclipseUserData.h" #include "RimObservedData.h" +#include "RimObservedEclipseUserData.h" #include "RimSummaryObservedDataFile.h" +#include "RiuMainPlotWindow.h" + #include "cafUtils.h" #include @@ -115,6 +118,13 @@ RimObservedData* RimObservedDataCollection::createAndAddObservedDataFromFileName observedData->updateMetaData(); observedData->updateOptionSensitivity(); + RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow(); + if (mainPlotWindow) + { + mainPlotWindow->selectAsCurrentItem(observedData); + mainPlotWindow->setExpanded(observedData, true); + } + this->updateConnectedEditors(); } } diff --git a/ApplicationCode/UnitTests/ObservedDataParser-Test.cpp b/ApplicationCode/UnitTests/ObservedDataParser-Test.cpp index 82c649e3f7..261992776f 100644 --- a/ApplicationCode/UnitTests/ObservedDataParser-Test.cpp +++ b/ApplicationCode/UnitTests/ObservedDataParser-Test.cpp @@ -382,6 +382,48 @@ TEST(RifColumnBasedRsmspecParserTest, TestTableValues) EXPECT_NE("P-9P", tables.at(1).at(0).summaryAddress.wellName()); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +TEST(RifColumnBasedRsmspecParserTest, TestTableMissingWellNames) +{ + + QString data; + QTextStream out(&data); + + out << "1\n"; + out << "---------------------------------------\n"; + out << "SUMMARY OF RUN SIP USER FILE DATA VECTORS\n"; + out << "---------------------------------------\n"; + out << "TIME WLVP WPLT WTEST WFOFF WBUP\n"; + out << "DAYS BARSA BARSA BARSA BARSA BARSA\n"; + out << "\n"; + out << " 1 0.0 0.0 0.0 0.0 0.0\n"; + out << " 2 0.0 0.0 0.0 0.0 0.0\n"; + out << " 3 0.0 0.0 0.0 0.0 0.0\n"; + out << " 4 0.0 0.0 0.0 0.0 0.0\n"; + out << " 5 0.0 0.0 0.0 0.0 0.0\n"; + out << " 6 0.0 0.0 0.0 0.0 0.0\n"; + out << " 7 0.0 0.0 282 0.0 0.0\n"; + out << " 8 0.0 0.0 279 0.0 0.0\n"; + out << " 9 0.0 0.0 0.0 0.0 0.0\n"; + out << " 10 0.0 0.0 0.0 0.0 0.0\n"; + out << " 11 0.0 0.0 0.0 0.0 0.0\n"; + out << " 12 0.0 0.0 0.0 0.0 0.0\n"; + out << " 13 0.0 0.0 0.0 0.0 0.0\n"; + out << " 14 0.0 0.0 0.0 0.0 0.0\n"; + out << " 15 0.0 0.0 0.0 0.0 0.0\n"; + out << " 16 0.0 0.0 0.0 0.0 0.0\n"; + out << " 17 0.0 0.0 0.0 0.0 0.0\n"; + out << " 18 0.0 0.0 0.0 0.0 0.0\n"; + + RifColumnBasedUserDataParser parser = RifColumnBasedUserDataParser(data); + + std::vector< std::vector > tables = parser.tables(); + ASSERT_EQ(tables.size(), 1); + ASSERT_EQ(tables.at(0).size(), 6); +} + //-------------------------------------------------------------------------------------------------- /// //--------------------------------------------------------------------------------------------------