mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3724 Reload and recreate visualization when changing file
This commit is contained in:
parent
04754d394f
commit
0148fc2279
@ -215,7 +215,7 @@ void RimAnnotationCollection::reloadPolylinesFromFile(const std::vector<RimPolyl
|
||||
|
||||
if ( !totalErrorMessage.isEmpty() )
|
||||
{
|
||||
QMessageBox::warning(nullptr, "Import Formation Names", totalErrorMessage);
|
||||
QMessageBox::warning(nullptr, "Import Polylines", totalErrorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimPolylinesFromFileAnnotation, "PolylinesFromFileAnnotation");
|
||||
@ -190,6 +191,18 @@ void RimPolylinesFromFileAnnotation::fieldChangedByUi(const caf::PdmFieldHandle*
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue)
|
||||
{
|
||||
if (changedField == &m_polyLinesFileName)
|
||||
{
|
||||
QString errorMessage;
|
||||
this->readPolyLinesFile(&errorMessage);
|
||||
if (!errorMessage.isEmpty())
|
||||
{
|
||||
QString totalError = "\nError in: " + this->fileName()
|
||||
+ "\n\t" + errorMessage;
|
||||
QMessageBox::warning(nullptr, "Import Polylines", totalError);
|
||||
}
|
||||
}
|
||||
|
||||
RimAnnotationCollection* annColl = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted(annColl);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user