#include "support/debug.h"
#include <QHeaderView>
+#include <QTimer>
#include <vector>
typeCO->blockSignals(false);
setTocModel(typeCO->currentIndex());
+
+ // setTocModel produce QTreeView reset and setting depth again
+ // is needed. That must be done after all Qt updates are processed.
+ QTimer::singleShot(0, this, SLOT(setTreeDepth()));
}