mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Minor : use Diagram::showMe() method instead of emit several signal to do the same thing
This commit is contained in:
@@ -163,8 +163,6 @@ void QETDiagramEditor::setUpElementsPanel()
|
||||
connect(pa, SIGNAL(requestForProjectClosing (QETProject *)), this, SLOT(closeProject(QETProject *)));
|
||||
connect(pa, SIGNAL(requestForProjectPropertiesEdition (QETProject *)), this, SLOT(editProjectProperties(QETProject *)));
|
||||
connect(pa, SIGNAL(requestForNewDiagram (QETProject *)), this, SLOT(addDiagramToProject(QETProject *)));
|
||||
|
||||
connect(pa, SIGNAL(requestForDiagram (Diagram *)), this, SLOT(activateDiagram(Diagram *)));
|
||||
connect(pa, SIGNAL(requestForDiagramPropertiesEdition (Diagram *)), this, SLOT(editDiagramProperties(Diagram *)));
|
||||
connect(pa, SIGNAL(requestForDiagramDeletion (Diagram *)), this, SLOT(removeDiagram(Diagram *)));
|
||||
connect(pa, SIGNAL(requestForDiagramMoveUp (Diagram *)), this, SLOT(moveDiagramUp(Diagram *)));
|
||||
@@ -1990,25 +1988,6 @@ void QETDiagramEditor::writeSettings()
|
||||
settings.setValue("diagrameditor/state", saveState());
|
||||
}
|
||||
|
||||
/**
|
||||
Active le schema passe en parametre
|
||||
@param diagram Schema a activer
|
||||
*/
|
||||
void QETDiagramEditor::activateDiagram(Diagram *diagram)
|
||||
{
|
||||
if (QETProject *project = diagram -> project()) {
|
||||
if (ProjectView *project_view = findProject(project)) {
|
||||
activateWidget(project_view);
|
||||
project_view -> showDiagram(diagram);
|
||||
}
|
||||
} else {
|
||||
#if TODO_LIST
|
||||
#pragma message("@TODO gerer ce cas")
|
||||
#endif
|
||||
/// @todo gerer ce cas
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Active le projet passe en parametre
|
||||
@param project Projet a activer
|
||||
|
||||
Reference in New Issue
Block a user