mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-20 02:29:58 +01:00
Wrap code for better readability
This commit is contained in:
@@ -44,15 +44,19 @@ void DiagramPropertiesEditorDockWidget::setDiagram(Diagram *diagram)
|
||||
|
||||
if (m_diagram)
|
||||
{
|
||||
disconnect(m_diagram, SIGNAL(selectionChanged()), this, SLOT(selectionChanged()));
|
||||
disconnect(m_diagram, SIGNAL(destroyed()), this, SLOT(diagramWasDeleted()));
|
||||
disconnect(m_diagram, SIGNAL(selectionChanged()),
|
||||
this, SLOT(selectionChanged()));
|
||||
disconnect(m_diagram, SIGNAL(destroyed()),
|
||||
this, SLOT(diagramWasDeleted()));
|
||||
}
|
||||
|
||||
if (diagram)
|
||||
{
|
||||
m_diagram = diagram;
|
||||
connect(m_diagram, SIGNAL(selectionChanged()), this, SLOT(selectionChanged()), Qt::QueuedConnection);
|
||||
connect(m_diagram, SIGNAL(destroyed()), this, SLOT(diagramWasDeleted()));
|
||||
connect(m_diagram, SIGNAL(selectionChanged()),
|
||||
this, SLOT(selectionChanged()), Qt::QueuedConnection);
|
||||
connect(m_diagram, SIGNAL(destroyed()),
|
||||
this, SLOT(diagramWasDeleted()));
|
||||
selectionChanged();
|
||||
}
|
||||
else
|
||||
@@ -74,7 +78,10 @@ void DiagramPropertiesEditorDockWidget::selectionChanged()
|
||||
return;
|
||||
}
|
||||
|
||||
auto editor_ = PropertiesEditorFactory::propertiesEditor(m_diagram->selectedItems(), editors().count()? editors().first() : nullptr, this);
|
||||
auto editor_ = PropertiesEditorFactory::propertiesEditor(
|
||||
m_diagram->selectedItems(),
|
||||
editors().count() ? editors().first() : nullptr,
|
||||
this);
|
||||
if (!editor_) {
|
||||
clear();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user