Add a reload push button

Add a reload push button to quickly reload/update the gui according to
the current state of the terminal strip.
This commit is contained in:
joshua
2021-04-30 19:26:42 +02:00
parent d551c8e6b9
commit 36068abce7
3 changed files with 49 additions and 11 deletions

View File

@@ -262,4 +262,19 @@ void TerminalStripEditor::on_m_remove_terminal_strip_pb_clicked()
m_project->undoStack()->push(new RemoveTerminalStripCommand(strip, m_project));
}
on_m_reload_pb_clicked();
}
void TerminalStripEditor::on_m_reload_pb_clicked()
{
ui->m_terminal_strip_tw->clear();
m_item_strip_H.clear();
m_uuid_terminal_H.clear();
m_uuid_strip_H.clear();
qDeleteAll(m_item_strip_H.keys());
buildTree();
ui->m_terminal_strip_tw->expandRecursively(ui->m_terminal_strip_tw->rootIndex());
}