From d595d76eb23d98783448d2523121c5404eefb192 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Thu, 26 May 2016 23:24:29 +0400 Subject: [PATCH] Availability components check has been added --- limereport/items/lrtextitemeditor.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/limereport/items/lrtextitemeditor.cpp b/limereport/items/lrtextitemeditor.cpp index 5d10803..e2b6778 100644 --- a/limereport/items/lrtextitemeditor.cpp +++ b/limereport/items/lrtextitemeditor.cpp @@ -139,11 +139,14 @@ void TextItemEditor::initUI() m_completer->setModel(new QStringListModel(dataWords,m_completer)); ui->gbSettings->setVisible(false); - connect(ui->twScriptEngine->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), + + if (ui->twScriptEngine->selectionModel()){ + connect(ui->twScriptEngine->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(slotScriptItemsSelectionChanged(QModelIndex,QModelIndex))); + } BandDesignIntf* band = findParentBand(); - if (band && !band->datasourceName().isEmpty()){ + if (band && ui->twData->model() && !band->datasourceName().isEmpty()){ QModelIndexList nodes = ui->twData->model()->match( ui->twData->model()->index(0,0), Qt::DisplayRole,