mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user