mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improve plot manager behavior
Create plots for vectors with no grouping identifier Do not invalidate GUI on selection changed Use same name as in project tree
This commit is contained in:
parent
ccfc0e25bc
commit
26f1387bc6
@ -198,6 +198,8 @@ std::vector<std::vector<RifEclipseSummaryAddress>> RiaSummaryAddressAnalyzer::ad
|
||||
groupedByObject.insert( groupedByObject.end(), blockAdr.begin(), blockAdr.end() );
|
||||
groupedByObject.insert( groupedByObject.end(), aquiferAdr.begin(), aquiferAdr.end() );
|
||||
|
||||
groupedByObject.push_back( m_otherCategory );
|
||||
|
||||
return groupedByObject;
|
||||
}
|
||||
|
||||
@ -418,6 +420,11 @@ void RiaSummaryAddressAnalyzer::analyzeSingleAddress( const RifEclipseSummaryAdd
|
||||
{
|
||||
m_aquifers.insert( { address.aquiferNumber(), address } );
|
||||
}
|
||||
else if ( address.category() == RifEclipseSummaryAddress::SUMMARY_FIELD ||
|
||||
address.category() == RifEclipseSummaryAddress::SUMMARY_MISC )
|
||||
{
|
||||
m_otherCategory.push_back( address );
|
||||
}
|
||||
|
||||
if ( address.category() != RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
{
|
||||
|
@ -89,6 +89,7 @@ private:
|
||||
mutable std::set<std::string> m_quantitiesWithMatchingHistory;
|
||||
mutable std::set<std::string> m_quantitiesNoMatchingHistory;
|
||||
|
||||
std::vector<RifEclipseSummaryAddress> m_otherCategory;
|
||||
std::multimap<std::string, RifEclipseSummaryAddress> m_wellNames;
|
||||
std::multimap<std::string, RifEclipseSummaryAddress> m_groupNames;
|
||||
std::multimap<int, RifEclipseSummaryAddress> m_regionNumbers;
|
||||
|
@ -153,7 +153,7 @@ void RimSummaryMultiPlotCollection::summaryPlotItemInfos( QList<caf::PdmOptionIt
|
||||
{
|
||||
for ( RimSummaryPlot* plot : multiPlot->summaryPlots() )
|
||||
{
|
||||
QString displayName = plot->description();
|
||||
QString displayName = plot->userDescriptionField()->uiCapability()->uiValue().toString();
|
||||
optionInfos->push_back(
|
||||
caf::PdmOptionItemInfo( displayName, plot, false, plot->uiCapability()->uiIconProvider() ) );
|
||||
}
|
||||
|
@ -215,6 +215,8 @@ public:
|
||||
|
||||
void handleDroppedObjects( const std::vector<caf::PdmObjectHandle*>& objects ) override;
|
||||
|
||||
caf::PdmFieldHandle* userDescriptionField() override;
|
||||
|
||||
private:
|
||||
RiuPlotWidget* doCreatePlotViewWidget( QWidget* mainWindowParent = nullptr ) override;
|
||||
|
||||
@ -232,11 +234,10 @@ private:
|
||||
RimPlotAxisProperties* addNewAxisProperties( RiuPlotAxis plotAxis, const QString& name );
|
||||
|
||||
protected:
|
||||
caf::PdmFieldHandle* userDescriptionField() override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) override;
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) override;
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
@ -50,6 +50,7 @@
|
||||
#include "cafPdmUiLabelEditor.h"
|
||||
#include "cafPdmUiLineEditor.h"
|
||||
#include "cafPdmUiPushButtonEditor.h"
|
||||
#include "cafPdmUiTextEditor.h"
|
||||
#include "cafPdmUiTreeSelectionEditor.h"
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@ -76,6 +77,8 @@ RimSummaryPlotManager::RimSummaryPlotManager()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_addressCandidates, "AddressCandidates", "Vectors" );
|
||||
m_addressCandidates.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
||||
m_addressCandidates.uiCapability()->setUiReadOnly( true );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_selectedDataSources, "SelectedDataSources", "Data Sources" );
|
||||
m_selectedDataSources.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
||||
m_selectedDataSources.uiCapability()->setUiEditorTypeName( caf::PdmUiTreeSelectionEditor::uiEditorTypeName() );
|
||||
@ -472,14 +475,6 @@ void RimSummaryPlotManager::updateUiFromSelection()
|
||||
updateCurveCandidates();
|
||||
}
|
||||
|
||||
if ( !summaryPlot )
|
||||
{
|
||||
m_summaryPlot = nullptr;
|
||||
|
||||
std::vector<QString> tmp;
|
||||
m_addressCandidates = tmp;
|
||||
}
|
||||
|
||||
updateConnectedEditors();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user