} else {
/* Add base to the view */
wxTreeItemId added;
+ auto parent_id = dkdm_to_id(base->parent());
if (previous) {
- added = _dkdm->InsertItem(dkdm_to_id(base->parent()), *previous, std_to_wx(base->name()));
+ added = _dkdm->InsertItem(parent_id, *previous, std_to_wx(base->name()));
} else {
- added = _dkdm->AppendItem(dkdm_to_id(base->parent()), std_to_wx(base->name()));
+ added = _dkdm->AppendItem(parent_id, std_to_wx(base->name()));
}
+ _dkdm->SortChildren(parent_id);
_dkdm_id[added] = base;
}
try {
wxInitAllImageHandlers ();
- Config::FailedToLoad.connect (boost::bind (&App::config_failed_to_load, this));
+ Config::FailedToLoad.connect(boost::bind(&App::config_failed_to_load, this, _1));
Config::Warning.connect (boost::bind (&App::config_warning, this, _1));
splash = maybe_show_splash ();
signal_manager->ui_idle ();
}
- void config_failed_to_load ()
+ void config_failed_to_load(Config::LoadFailure what)
{
- message_dialog (_frame, _("The existing configuration failed to load. Default values will be used instead. These may take a short time to create."));
+ report_config_load_failure(_frame, what);
}
void config_warning (string m)