Improve load time of setup files by omitting excessive device configuration

This commit is contained in:
Jan Käberich 2022-10-30 12:07:59 +01:00
parent 2f5cbc80e9
commit eff18a22e8
7 changed files with 213 additions and 173 deletions

View file

@ -23,17 +23,17 @@ void ModeHandler::shutdown()
int ModeHandler::createMode(QString name, Mode::Type t)
{
auto mode = createNew(aw, name, t);
return createMode(mode);
return addMode(mode);
}
int ModeHandler::createMode(Mode *mode)
int ModeHandler::addMode(Mode *mode)
{
modes.push_back(mode);
currentModeIndex = int(modes.size()) - 1;
connect(mode, &Mode::statusbarMessage, this, &ModeHandler::setStatusBarMessageChanged);
auto m = getMode(currentModeIndex);
activate(m);
// auto m = getMode(currentModeIndex);
// activate(m);
emit ModeCreated(currentModeIndex);
return (currentModeIndex);