mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 14:50:53 +01:00
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user