File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,16 @@ void Intro::setDataDirectory(const QString &dataDir)
182182 }
183183}
184184
185+ int64_t Intro::getPruneMiB () const
186+ {
187+ switch (ui->prune ->checkState ()) {
188+ case Qt::Checked:
189+ return PruneGBtoMiB (m_prune_target_gb);
190+ case Qt::Unchecked: default :
191+ return 0 ;
192+ }
193+ }
194+
185195bool Intro::showIfNeeded (bool & did_show_intro, int64_t & prune_MiB)
186196{
187197 did_show_intro = false ;
@@ -233,7 +243,7 @@ bool Intro::showIfNeeded(bool& did_show_intro, int64_t& prune_MiB)
233243 }
234244
235245 // Additional preferences:
236- prune_MiB = intro.ui -> prune -> isChecked () ? PruneGBtoMiB (intro. m_prune_target_gb ) : int64_t ( 0 );
246+ prune_MiB = intro.getPruneMiB ( );
237247
238248 settings.setValue (" strDataDir" , dataDir);
239249 settings.setValue (" fReset" , false );
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ class Intro : public QDialog
3636
3737 QString getDataDirectory ();
3838 void setDataDirectory (const QString &dataDir);
39+ int64_t getPruneMiB () const ;
3940
4041 /* *
4142 * Determine data directory. Let the user choose if the current one doesn't exist.
You can’t perform that action at this time.
0 commit comments