[summary] Clear model on leave
This commit is contained in:
parent
295f6f9737
commit
2fdb6fdf37
@ -84,12 +84,12 @@ Config::retranslate()
|
||||
if ( Calamares::Settings::instance()->isSetupMode() )
|
||||
{
|
||||
m_message = tr( "This is an overview of what will happen once you start "
|
||||
"the setup procedure." );
|
||||
"the setup procedure." );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_message = tr( "This is an overview of what will happen once you start "
|
||||
"the install procedure." );
|
||||
"the install procedure." );
|
||||
}
|
||||
Q_EMIT titleChanged( m_title );
|
||||
Q_EMIT messageChanged( m_message );
|
||||
@ -125,3 +125,9 @@ Config::collectSummaries( const Calamares::ViewStep* upToHere )
|
||||
|
||||
m_summary->setSummaryList( steps );
|
||||
}
|
||||
|
||||
void
|
||||
Config::clearSummaries()
|
||||
{
|
||||
m_summary->setSummaryList( {} );
|
||||
}
|
||||
|
@ -74,6 +74,8 @@ public:
|
||||
|
||||
///@brief Called later, to load the model once all viewsteps are there
|
||||
void collectSummaries( const Calamares::ViewStep* upToHere );
|
||||
///@brief Clear the model of steps (to avoid dangling widgets)
|
||||
void clearSummaries();
|
||||
|
||||
QAbstractListModel* summaryModel() const { return m_summary; }
|
||||
|
||||
|
@ -92,5 +92,6 @@ SummaryViewStep::onActivate()
|
||||
void
|
||||
SummaryViewStep::onLeave()
|
||||
{
|
||||
m_config->clearSummaries();
|
||||
m_widget->onLeave();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user