Commit b3b21f8f authored by Manuel Grizonnet's avatar Manuel Grizonnet

Merge branch 'release-6.6' into 1620-monteverdi-and-mapla-segfault-at-startup

parents 97ee48e4 ae0a8d74
......@@ -2370,6 +2370,7 @@ MainWindow
// import the result image into the database
ImportImage( outfname, false );
m_ImageView->updateGL();
}
/*****************************************************************************/
......
......@@ -418,9 +418,6 @@ protected:
const QString& orgName,
const QString& orgDomain );
/**
*/
inline void SynchronizeSettings() const;
//
// Protected attributes.
......@@ -647,8 +644,6 @@ I18nCoreApplication
{
assert( m_Settings!=NULL );
SynchronizeSettings();
return m_Settings->contains( key );
}
......@@ -663,8 +658,6 @@ I18nCoreApplication
// qDebug() << this << "::StoreSettingsKey(" << key << ", " << value << ")";
m_Settings->setValue( key, value );
SynchronizeSettings();
}
/*****************************************************************************/
......@@ -675,42 +668,9 @@ I18nCoreApplication
{
assert( m_Settings!=NULL );
SynchronizeSettings();
return m_Settings->value( key );
}
/*****************************************************************************/
inline
void
I18nCoreApplication
::SynchronizeSettings() const
{
assert( m_Settings!=NULL );
m_Settings->sync();
switch( m_Settings->status() )
{
case QSettings::NoError:
// Ok.
break;
case QSettings::AccessError:
throw SystemError( ToStdString( tr( "Cannot access settings file." ) ) );
break;
case QSettings::FormatError:
throw SystemError( ToStdString( tr( "Bad settings file format." ) ) );
break;
default:
// In case when a new enum value if added in the API.
assert( false );
break;
}
}
} // end namespace 'mvd'
#endif // I18nCoreApplication_h
......@@ -212,6 +212,7 @@ public:
// Public SLOTS.
public slots:
void Clear();
void Deleting( unsigned int index );
inline void Delete( const KeyType & );
inline void DeleteCurrent();
inline void LowerCurrent();
......
......@@ -220,9 +220,9 @@ StackedLayerModel
/*****************************************************************************/
void
StackedLayerModel
::Delete( SizeType index )
::Deleting( unsigned int index )
{
// qDebug() << this << "::Delete(" << index << ")";
// qDebug() << this << "::Delete(" << index << ")";
//
......@@ -297,7 +297,7 @@ StackedLayerModel
index>m_Reference
? m_Reference
: ( m_Reference > 0
? m_Reference - 1
? m_Reference - 1
: GetCount() > 0 ? 0 : StackedLayerModel::NIL_INDEX ),
true
);
......@@ -309,8 +309,14 @@ StackedLayerModel
delete layer;
layer = NULL;
}
}
//
void
StackedLayerModel
::Delete( SizeType index )
{
// the work of deleting model is now done in the above function
// Deleting(unsigned int index)
// Emit signals.
emit LayerDeleted( index );
emit ContentChanged();
......
......@@ -255,6 +255,9 @@ public slots:
//
// Signals.
signals:
//Bugfix for layer deletion
void LayerDeletingModel( unsigned int index);
/*-[ PROTECTED SECTION ]---------------------------------------------------*/
......
......@@ -159,6 +159,10 @@ public slots:
//
// Signals.
signals:
/**
*/
//bugFix for layer deletion
void LayerDeletingWidget( unsigned int index );
/**
*/
void CurrentChanged( int );
......
......@@ -150,6 +150,14 @@ LayerStackController
SLOT( OnProjectionButtonClicked() )
);
//bugfix for layer deletion
QObject::connect(
widget,
SIGNAL( LayerDeletingWidget( unsigned int ) ),
// to:
model,
SLOT( Deleting( unsigned int ) )
);
QObject::connect(
widget,
......@@ -243,7 +251,7 @@ LayerStackController
QObject::disconnect(
model,
SIGNAL( CurrentChanged( size_t ) ),
// from:
// from:deletin
this,
SLOT( OnStackedLayerCurrentChanged( size_t ) )
);
......@@ -289,6 +297,14 @@ LayerStackController
SLOT( OnProjectionButtonClicked() )
);
//Bugfix for layer deletion
QObject::disconnect(
widget,
SIGNAL( LayerDeletingWidget( unsigned int ) ),
// to:
model,
SLOT( Deleting( unsigned int ) )
);
QObject::disconnect(
widget,
......
......@@ -791,10 +791,11 @@ LayerStackItemModel
beginRemoveRows( p, row, row + count - 1 );
{
// StackedLayerModel has already been shortened.
// StackedLayerModel need to be shortened now
emit LayerDeletingModel(row);
// TODO: Release additional row data here.
}
endRemoveRows();
return true;
......
......@@ -192,6 +192,16 @@ LayerStackWidget
this,
SIGNAL( ResetEffectsButtonClicked() )
);
/////// Bugfix for layer deletion
QObject::connect(
this->GetItemModel(),
SIGNAL( LayerDeletingModel( unsigned int ) ),
// to:
this,
SIGNAL( LayerDeletingWidget( unsigned int) )
);
///////////////
}
/*******************************************************************************/
......
......@@ -17,7 +17,7 @@ It is community driven, extensible and heavily documented. Orfeo ToolBox is
not a black box!
[![Travis Build Status](https://travis-ci.org/orfeotoolbox/OTB.png?branch=develop)](https://travis-ci.org/orfeotoolbox/OTB)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/2405/badge.svg)](https://scan.coverity.com/projects/orfeo-toolbox)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/2405/badge.svg)](https://scan.coverity.com/projects/orfeotoolbox)
### Resources
* [OTB's website](https://www.orfeo-toolbox.org/)
......
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