mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Conductor properties : Add two value, function and tension/protocol.
Revamp some widget to edit it. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4172 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
#include "element.h"
|
||||
#include "diagram.h"
|
||||
#include "conductorautonumerotation.h"
|
||||
#include "conductor.h"
|
||||
#include "potentialselectordialog.h"
|
||||
|
||||
/**
|
||||
* @brief LinkElementCommand::LinkElementCommand
|
||||
@@ -211,7 +213,19 @@ void LinkElementCommand::redo()
|
||||
&& m_element->conductors().size() \
|
||||
&& m_linked_after.size() && m_linked_after.first()->conductors().size())
|
||||
{
|
||||
ConductorAutoNumerotation::checkPotential(m_element->conductors().first(), this);
|
||||
//fill list of potential
|
||||
QSet <Conductor *> c_list = m_element->conductors().first()->relatedPotentialConductors();
|
||||
c_list << m_element->conductors().first();
|
||||
//fill list of text
|
||||
QStringList strl;
|
||||
foreach (const Conductor *c, c_list) strl<<(c->properties().text);
|
||||
|
||||
//check text list, isn't same in potential, ask user what to do
|
||||
if (!QET::eachStrIsEqual(strl))
|
||||
{
|
||||
PotentialSelectorDialog psd(m_element, this);
|
||||
psd.exec();
|
||||
}
|
||||
m_first_redo = false;
|
||||
}
|
||||
QUndoCommand::redo();
|
||||
|
||||
Reference in New Issue
Block a user