mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-17 22:48:44 +00:00
Mark the DFN editor modified after adding / removing an element.
This commit is contained in:
parent
5e2b448cbe
commit
8bf8cc1d4f
2 changed files with 17 additions and 7 deletions
|
@ -123,6 +123,8 @@ void GeorgesDFNDialog::onAddClicked()
|
||||||
m_pvt->dfn->addEntry( name.toUtf8().constData() );
|
m_pvt->dfn->addEntry( name.toUtf8().constData() );
|
||||||
|
|
||||||
log( "Added " + name );
|
log( "Added " + name );
|
||||||
|
|
||||||
|
onModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeorgesDFNDialog::onRemoveClicked()
|
void GeorgesDFNDialog::onRemoveClicked()
|
||||||
|
@ -137,6 +139,8 @@ void GeorgesDFNDialog::onRemoveClicked()
|
||||||
delete item;
|
delete item;
|
||||||
|
|
||||||
m_pvt->dfn->removeEntry( row );
|
m_pvt->dfn->removeEntry( row );
|
||||||
|
|
||||||
|
onModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeorgesDFNDialog::onCurrentRowChanged( int row )
|
void GeorgesDFNDialog::onCurrentRowChanged( int row )
|
||||||
|
@ -149,13 +153,7 @@ void GeorgesDFNDialog::onCurrentRowChanged( int row )
|
||||||
|
|
||||||
void GeorgesDFNDialog::onValueChanged( const QString &key, const QString &value )
|
void GeorgesDFNDialog::onValueChanged( const QString &key, const QString &value )
|
||||||
{
|
{
|
||||||
if( !isModified() )
|
onModified();
|
||||||
{
|
|
||||||
setModified( true );
|
|
||||||
setWindowTitle( windowTitle() + "*" );
|
|
||||||
|
|
||||||
Q_EMIT modified();
|
|
||||||
}
|
|
||||||
|
|
||||||
log( m_ui.list->currentItem()->text() + "." + key + " = " + value );
|
log( m_ui.list->currentItem()->text() + "." + key + " = " + value );
|
||||||
|
|
||||||
|
@ -165,6 +163,17 @@ void GeorgesDFNDialog::onValueChanged( const QString &key, const QString &value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GeorgesDFNDialog::onModified()
|
||||||
|
{
|
||||||
|
if( !isModified() )
|
||||||
|
{
|
||||||
|
setModified( true );
|
||||||
|
setWindowTitle( windowTitle() + "*" );
|
||||||
|
|
||||||
|
Q_EMIT modified();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void GeorgesDFNDialog::log( const QString &msg )
|
void GeorgesDFNDialog::log( const QString &msg )
|
||||||
{
|
{
|
||||||
QString logMsg = buildLogMsg( msg );
|
QString logMsg = buildLogMsg( msg );
|
||||||
|
|
|
@ -27,6 +27,7 @@ private Q_SLOTS:
|
||||||
void onValueChanged( const QString& key, const QString &value );
|
void onValueChanged( const QString& key, const QString &value );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void onModified();
|
||||||
void log( const QString &msg );
|
void log( const QString &msg );
|
||||||
void setupConnections();
|
void setupConnections();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue