mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-23 18:50:52 +01:00
Improve how element editor is opened to edit an element in a diagram.
Before this commit : ElementPropertiesWidget emit a signal of Diagram to edit an element, and the signal goes up from Diagram -> DiagramView -> ProjectView -> QetDiagramEditor and QetDiagramEditor call a static function. Now : ElementPropertiesWidget call the static function itself and that all. All unnecessary signals are removed.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "dynamicelementtextitemeditor.h"
|
||||
#include "dynamicelementtextitem.h"
|
||||
#include "elementtextitemgroup.h"
|
||||
#include "qetapp.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QLabel>
|
||||
@@ -245,7 +246,7 @@ void ElementPropertiesWidget::editElement()
|
||||
if (m_element && m_diagram)
|
||||
{
|
||||
m_diagram->findElementRequired(m_element.data()->location());
|
||||
m_diagram->editElementRequired(m_element.data()->location());
|
||||
QETApp::instance()->openElementLocations(QList<ElementsLocation>() << m_element.data()->location());
|
||||
emit findEditClicked();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user