Code adjustments

This commit is contained in:
Jacob Støren committed 2017-11-13 15:23:38 +01:00
1 parent 612dfd7c9f
commit 9853c15ec6
3 files changed
+27 -7

No files matched your search

@@ -69,11 +69,15 @@ QString RiaWellNameComparer::tryMatchNameInList(QString searchName, const std::v
} }
// Try matching ignoring spaces, dashes and underscores // Try matching ignoring spaces, dashes and underscores
return tryMatchName(searchName, nameList, [](const QString& str) { return tryMatchName(searchName,
QString s = str; nameList,
s = removeWellNamePrefix(s); [](const QString& str)
return s.remove(' ').remove('-').remove('_'); {
}); QString s = str;
s = removeWellNamePrefix(s);
return s.remove(' ').remove('-').remove('_');
}
);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -176,6 +176,22 @@ void caf::PdmUiTreeSelectionQModel::setOptions(caf::PdmUiFieldEditorHandle* fiel
} }
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void caf::PdmUiTreeSelectionQModel::setUiValueCache(const QVariant* uiValuesCache)
{
m_uiValueCache = uiValuesCache;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void caf::PdmUiTreeSelectionQModel::resetUiValueCache()
{
m_uiValueCache = nullptr;
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -69,8 +69,8 @@ public:
int optionItemCount() const; int optionItemCount() const;
void setOptions(caf::PdmUiFieldEditorHandle* field, const QList<caf::PdmOptionItemInfo>& options); void setOptions(caf::PdmUiFieldEditorHandle* field, const QList<caf::PdmOptionItemInfo>& options);
void setUiValueCache(const QVariant* uiValuesCache ) {m_uiValueCache = uiValuesCache; } void setUiValueCache(const QVariant* uiValuesCache );
void resetUiValueCache() { m_uiValueCache = nullptr; } void resetUiValueCache();
virtual Qt::ItemFlags flags(const QModelIndex &index) const override; virtual Qt::ItemFlags flags(const QModelIndex &index) const override;
virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;