Wrap code for better readability

This commit is contained in:
Simon De Backer
2020-08-20 21:58:23 +02:00
parent 0c00d83b27
commit 331918d143
41 changed files with 716 additions and 190 deletions

View File

@@ -117,14 +117,19 @@ QList <Element *> ElementProvider::find(const int filter) const {
and not already in all the chain of next/previous table of table (if set)
If table and model are nullptr, return every tables
*/
QVector<QetGraphicsTableItem *> ElementProvider::table(QetGraphicsTableItem *table, QAbstractItemModel *model)
QVector<QetGraphicsTableItem *> ElementProvider::table(
QetGraphicsTableItem *table,
QAbstractItemModel *model)
{
QVector<QetGraphicsTableItem *> v_;
QVector<QetGraphicsTableItem *> linked_vector;
if (table)
{
auto linked_table = table->previousTable() ? table->previousTable() : table->nextTable(); //table can be inside a chain, at the head of a chain or alone
//table can be inside a chain, at the head of a chain or alone
auto linked_table = table->previousTable()
? table->previousTable()
: table->nextTable();
while (linked_table) { //Go to the first table
if (linked_table->previousTable())
linked_table = linked_table->previousTable();