diff --git a/sources/diagram.h b/sources/diagram.h index 48aab2bbb..f0df1ff60 100644 --- a/sources/diagram.h +++ b/sources/diagram.h @@ -282,9 +282,6 @@ class Diagram : public QGraphicsScene /// from the diagram within elements collection void findElementRequired(const ElementsLocation &); - /// Signal emitted when users wish to edit an element from the diagram - void editElementRequired(const ElementsLocation &); - void diagramActivated(); }; Q_DECLARE_METATYPE(Diagram *) diff --git a/sources/diagramview.cpp b/sources/diagramview.cpp index 93c60edac..b36fa292d 100644 --- a/sources/diagramview.cpp +++ b/sources/diagramview.cpp @@ -91,7 +91,6 @@ DiagramView::DiagramView(Diagram *diagram, QWidget *parent) : connect(m_diagram, SIGNAL(showDiagram(Diagram*)), this, SIGNAL(showDiagram(Diagram*))); connect(m_diagram, SIGNAL(sceneRectChanged(QRectF)), this, SLOT(adjustSceneRect())); connect(&(m_diagram -> border_and_titleblock), SIGNAL(diagramTitleChanged(const QString &)), this, SLOT(updateWindowTitle())); - connect(diagram, SIGNAL(editElementRequired(ElementsLocation)), this, SIGNAL(editElementRequired(ElementsLocation))); connect(diagram, SIGNAL(findElementRequired(ElementsLocation)), this, SIGNAL(findElementRequired(ElementsLocation))); QShortcut *edit_conductor_color_shortcut = new QShortcut(QKeySequence(Qt::Key_F2), this); diff --git a/sources/diagramview.h b/sources/diagramview.h index 2e22dbbde..0b2c3a0fa 100644 --- a/sources/diagramview.h +++ b/sources/diagramview.h @@ -108,8 +108,6 @@ class DiagramView : public QGraphicsView void titleChanged(DiagramView *, const QString &); /// Signal emitted when users wish to locate an element from the diagram within elements collection void findElementRequired(const ElementsLocation &); - /// Signal emitted when users wish to edit an element from the diagram - void editElementRequired(const ElementsLocation &); /// Signal emmitted when diagram must be show void showDiagram (Diagram *); /// Signal emmtted when free rubberband changed. diff --git a/sources/projectview.cpp b/sources/projectview.cpp index be83c21c1..975a1404a 100644 --- a/sources/projectview.cpp +++ b/sources/projectview.cpp @@ -888,7 +888,6 @@ void ProjectView::diagramAdded(Diagram *diagram) connect(dv, &DiagramView::showDiagram, this, QOverload::of(&ProjectView::showDiagram)); connect(dv, &DiagramView::titleChanged, this, &ProjectView::updateTabTitle); connect(dv, &DiagramView::findElementRequired, this, &ProjectView::findElementRequired); - connect(dv, &DiagramView::editElementRequired, this, &ProjectView::editElementRequired); connect(&dv->diagram()->border_and_titleblock , &BorderTitleBlock::titleBlockFolioChanged, [this, dv]() {this->updateTabTitle(dv);}); // signal diagram view was added diff --git a/sources/projectview.h b/sources/projectview.h index 574b0ccba..391cc989f 100644 --- a/sources/projectview.h +++ b/sources/projectview.h @@ -135,7 +135,6 @@ class ProjectView : public QWidget void errorEncountered(const QString &); // relayed signals void findElementRequired(const ElementsLocation &); - void editElementRequired(const ElementsLocation &); private: void initActions(); diff --git a/sources/qetdiagrameditor.cpp b/sources/qetdiagrameditor.cpp index 40869836d..e21c6afee 100644 --- a/sources/qetdiagrameditor.cpp +++ b/sources/qetdiagrameditor.cpp @@ -1757,8 +1757,6 @@ void QETDiagramEditor::addProjectView(ProjectView *project_view) //Manage request for edit or find element and titleblock connect (project_view, &ProjectView::findElementRequired, this, &QETDiagramEditor::findElementInPanel); - connect (project_view, &ProjectView::editElementRequired, - this, &QETDiagramEditor::editElementInEditor); // display error messages sent by the project view connect(project_view, SIGNAL(errorEncountered(QString)), @@ -2260,27 +2258,6 @@ void QETDiagramEditor::findElementInPanel(const ElementsLocation &location) m_element_collection_widget->setCurrentLocation(location); } -/** - Lance l'editeur d'element pour l'element filename - @param location Emplacement de l'element a editer -*/ -void QETDiagramEditor::editElementInEditor(const ElementsLocation &location) -{ - QETApp::instance() -> openElementLocations(QList() - << location); -} - -/** - Launch an element editor to edit the selected element in the current - diagram view. -*/ -void QETDiagramEditor::editSelectedElementInEditor() -{ - if (Element *selected_element = currentElement()) { - editElementInEditor(selected_element -> location()); - } -} - /** Show the error message contained in \a result. */ @@ -2306,7 +2283,7 @@ void QETDiagramEditor::showError(const QString &error) */ void QETDiagramEditor::subWindowActivated(QMdiSubWindow *subWindows) { - Q_UNUSED(subWindows); + Q_UNUSED(subWindows) slot_updateActions(); slot_updateWindowsMenu(); diff --git a/sources/qetdiagrameditor.h b/sources/qetdiagrameditor.h index 12b4adc69..c633f1fce 100644 --- a/sources/qetdiagrameditor.h +++ b/sources/qetdiagrameditor.h @@ -134,8 +134,6 @@ class QETDiagramEditor : public QETMainWindow void reloadOldElementPanel(); void diagramWasAdded(DiagramView *); void findElementInPanel(const ElementsLocation &); - void editElementInEditor(const ElementsLocation &); - void editSelectedElementInEditor(); void showError(const QETResult &); void showError(const QString &); void subWindowActivated(QMdiSubWindow *subWindows); diff --git a/sources/ui/elementpropertieswidget.cpp b/sources/ui/elementpropertieswidget.cpp index 6e42bc1a3..704d8afb4 100644 --- a/sources/ui/elementpropertieswidget.cpp +++ b/sources/ui/elementpropertieswidget.cpp @@ -26,6 +26,7 @@ #include "dynamicelementtextitemeditor.h" #include "dynamicelementtextitem.h" #include "elementtextitemgroup.h" +#include "qetapp.h" #include #include @@ -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() << m_element.data()->location()); emit findEditClicked(); } }