Refactor some properties dialog.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4027 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2015-06-23 20:40:05 +00:00
parent 55e013f3e0
commit 3c21364d5e
13 changed files with 112 additions and 317 deletions

View File

@@ -124,8 +124,12 @@ bool ElementPropertiesWidget::setLiveEdit(bool live_edit)
*/
void ElementPropertiesWidget::findInPanel()
{
if (CustomElement *custom_element = qobject_cast<CustomElement *>(m_element))
emit findElementRequired(custom_element->location());
CustomElement *custom_element = qobject_cast<CustomElement *>(m_element);
if (custom_element && m_diagram)
{
m_diagram->findElementRequired(custom_element->location());
emit findEditClicked();
}
}
/**
@@ -134,10 +138,12 @@ void ElementPropertiesWidget::findInPanel()
*/
void ElementPropertiesWidget::editElement()
{
if (CustomElement *custom_element = qobject_cast<CustomElement *>(m_element))
CustomElement *custom_element = qobject_cast<CustomElement *>(m_element);
if (custom_element && m_diagram)
{
emit findElementRequired(custom_element->location());
emit editElementRequired(custom_element->location());
m_diagram->findElementRequired(custom_element->location());
m_diagram->editElementRequired(custom_element->location());
emit findEditClicked();
}
}