Commit 63d745e0 authored by Stéphane Albert's avatar Stéphane Albert
Browse files

BUG:

parent b59defc7
......@@ -243,7 +243,7 @@ DatasetDescriptor
QDomText textNode( node.toText() );
// TODO: Manage XML structure errors.
assert( !textNode.isNull() );
textNode.setData(
ContainerToString(
settings->GetDynamicsParams().begin(),
......
......@@ -152,7 +152,7 @@ DatasetModel
//
// 2.4a: Force writing descriptor with newly imported image.
WriteDescriptor();
Save();
}
//
......@@ -230,7 +230,7 @@ DatasetModel
// Load image-models from descriptor.
// TODO: Replace DatasetModel::BuildContext() by (width, height).
ParseDescriptor(buildContext);
ParseDescriptor( buildContext );
}
}
......@@ -266,11 +266,12 @@ DatasetModel
<< "\nquicklook:" << imageContext.m_Quicklook;
// TODO: 3) Remove WxH for screen best-fit during loading of model!
AbstractImageModel* imageModel = LoadImage(
/* AbstractImageModel* imageModel = */ LoadImage(
imageContext,
context->m_Width, context->m_Height
);
#if 0
// Access vector image-model.
VectorImageModel* vectorImageModel =
qobject_cast< VectorImageModel* >( imageModel );
......@@ -278,6 +279,7 @@ DatasetModel
// Re-assign rendering-settings to image-model.
vectorImageModel->SetSettings( settings );
#endif
}
}
......@@ -306,7 +308,13 @@ DatasetModel
++it )
{
if( ( *it )->IsModified() )
{
const VectorImageModel* vim =
qobject_cast< const VectorImageModel* >( *it );
qDebug() << vim->GetFilename() << "is modified.";
return true;
}
}
// Otherwise, this dataset-model is not modified.
......
......@@ -197,6 +197,14 @@ void
VectorImageModel
::virtual_BuildModel( void* context )
{
// Get build-context.
assert( context!=NULL );
BuildContext* buildContext = static_cast< BuildContext* >( context );
// Get build-context settings.
Settings * const settings =
static_cast< Settings * const >( buildContext->m_Settings );
//
// Step #1: Perform pre-process of AbstractModel::BuildModel()
// pattern.
......@@ -204,7 +212,8 @@ VectorImageModel
// Store default display settings in the pre-process stage
// i.e. before histogram is generated by the standard
// AbstractImageModel::BuildModel().
InitializeColorSetupSettings();
if( settings==NULL )
InitializeColorSetupSettings();
//
// Step #2: Perform standard AbstractModel::BuildModel()
......@@ -219,7 +228,10 @@ VectorImageModel
// Store min/max pixel for color-dynamics once histogram has been
// generated.
InitializeColorDynamicsSettings();
if( settings==NULL )
InitializeColorDynamicsSettings();
else
SetSettings( *settings );
// Initialize RgbaImageModel.
InitializeRgbaPipeline();
......
......@@ -114,7 +114,7 @@ public:
/**
* \brief Copy constructor.
*
* \param
* \param other
*
* Copy settings POD content without the modified flag.
*/
......@@ -123,7 +123,14 @@ public:
/**
* \brief Destructor.
*/
~Settings() ;
~Settings();
/**
* \brief Assignment operator.
*
* \parapm other
*/
Settings& operator=( const Settings& other );
/**
*/
......@@ -561,7 +568,23 @@ VectorImageModel::Settings
m_IsModified( false ),
m_IsApplied( other.m_IsApplied )
{
qDebug() << "Settings( const Settigs& )";
qDebug() << this << "Settings( const Settigs& )";
}
/*****************************************************************************/
inline
VectorImageModel::Settings&
VectorImageModel::Settings
::operator=( const Settings& other )
{
if( &other==this )
return *this;
m_RgbChannels = other.m_RgbChannels;
m_DynamicsParams = other.m_DynamicsParams;
m_IsApplied = other.m_IsApplied;
return *this;
}
/*****************************************************************************/
......@@ -595,7 +618,7 @@ void
VectorImageModel::Settings
::SetModified()
{
qDebug() << "SetModified()";
qDebug() << this << "::SetModified()";
m_IsModified = true;
m_IsApplied = false;
......@@ -607,7 +630,7 @@ void
VectorImageModel::Settings
::ClearModified()
{
qDebug() << "ClearModified()";
qDebug() << this << "::ClearModified()";
m_IsModified = false;
}
......@@ -618,7 +641,7 @@ void
VectorImageModel::Settings
::SetApplied()
{
qDebug() << "SetApplied()";
qDebug() << this << "::SetApplied()";
m_IsApplied = true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment