diff options
| -rw-r--r-- | Swift/QtUI/Trellis/QtDynamicGridLayout.cpp | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp b/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp index 5600cc8..b753ffa 100644 --- a/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp +++ b/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp @@ -290,7 +290,12 @@ void QtDynamicGridLayout::setDimensions(const QSize& dim) {                      while(oldTabWidget->count()) {                          QIcon icon = oldTabWidget->tabIcon(0);                          QString text = oldTabWidget->tabText(0); -                        newTabWidget->addTab(oldTabWidget->widget(0), icon, text); +                        QWidget* movingTab = oldTabWidget->widget(0); +                        //If handling was allowed, QtChatTabs::handleWidgetShown() would be triggered when newTabWidget has no tabs. +                        //That would access indices of the gridLayout_ that are null because they have been migrated to the newLayout. +                        movingTab->blockSignals(true); +                        newTabWidget->addTab(movingTab, icon, text); +                        movingTab->blockSignals(false);                      }                      delete oldTabWidget;                  }  | 
 Swift