When we select an element dynamic text, the element properties widget switch to the tab of dynamics text and expand and select the item in the tree that represent the dynamic text.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5024 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2017-08-22 18:27:23 +00:00
parent fe46dc29a6
commit 53ae49b3c7
11 changed files with 93 additions and 15 deletions

View File

@@ -105,6 +105,21 @@ void DynamicElementTextItemEditor::apply()
deti->blockSignals(false);
}
/**
* @brief DynamicElementTextItemEditor::setCurrentText
* Expand and select the item for text @text
* @param text
*/
void DynamicElementTextItemEditor::setCurrentText(DynamicElementTextItem *text)
{
QModelIndex index = m_model->indexFromText(text);
if(!index.isValid())
return;
m_tree_view->expand(index);
m_tree_view->setCurrentIndex(index);
}
void DynamicElementTextItemEditor::dataEdited(QStandardItem *qsi)
{
Q_UNUSED(qsi)