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() );
|
||||
|
||||
log( "Added " + name );
|
||||
|
||||
onModified();
|
||||
}
|
||||
|
||||
void GeorgesDFNDialog::onRemoveClicked()
|
||||
|
@ -137,6 +139,8 @@ void GeorgesDFNDialog::onRemoveClicked()
|
|||
delete item;
|
||||
|
||||
m_pvt->dfn->removeEntry( row );
|
||||
|
||||
onModified();
|
||||
}
|
||||
|
||||
void GeorgesDFNDialog::onCurrentRowChanged( int row )
|
||||
|
@ -149,13 +153,7 @@ void GeorgesDFNDialog::onCurrentRowChanged( int row )
|
|||
|
||||
void GeorgesDFNDialog::onValueChanged( const QString &key, const QString &value )
|
||||
{
|
||||
if( !isModified() )
|
||||
{
|
||||
setModified( true );
|
||||
setWindowTitle( windowTitle() + "*" );
|
||||
|
||||
Q_EMIT modified();
|
||||
}
|
||||
onModified();
|
||||
|
||||
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 )
|
||||
{
|
||||
QString logMsg = buildLogMsg( msg );
|
||||
|
|
|
@ -27,6 +27,7 @@ private Q_SLOTS:
|
|||
void onValueChanged( const QString& key, const QString &value );
|
||||
|
||||
private:
|
||||
void onModified();
|
||||
void log( const QString &msg );
|
||||
void setupConnections();
|
||||
|
||||
|
|
Loading…
Reference in a new issue