mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-14 17:44:13 +02:00
Merge pull request #1456 from Kellermorph/terminal-potential
Terminal: rename potential separation to function separation
This commit is contained in:
@@ -851,6 +851,32 @@ void ConductorProperties::applyChanges(const ConductorProperties &before,
|
||||
singleLineProperties.setPhasesCount(slp_after.phasesCount());
|
||||
}
|
||||
|
||||
/**
|
||||
@brief ConductorProperties::applyTensionProtocolChange
|
||||
Copy into this the voltage / protocol when it differs between before
|
||||
and after, and leave every other attribute as it is. This is the one
|
||||
property a function separated terminal element lets through
|
||||
(@see Conductor::functionSeparatedConductors): the voltage /
|
||||
protocol describes the electrical node itself, while the text, the
|
||||
function, the wire color... describe one side of the separation and
|
||||
stay local to it.
|
||||
|
||||
Both arguments describe one edit -- what was shown to the user, and
|
||||
what the user made of it -- so that only an edit which really
|
||||
changed the voltage / protocol passes it on. Passing the far wire's
|
||||
own properties as @a before instead would make every edit overwrite
|
||||
its voltage: the two sides differ on that field just as often as
|
||||
not, so the comparison would hold no matter what was edited.
|
||||
@param before : the properties as they were shown to the user
|
||||
@param after : the properties after the user's edit
|
||||
*/
|
||||
void ConductorProperties::applyTensionProtocolChange(const ConductorProperties &before,
|
||||
const ConductorProperties &after)
|
||||
{
|
||||
if (before.m_tension_protocol != after.m_tension_protocol)
|
||||
m_tension_protocol = after.m_tension_protocol;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief ConductorProperties::defaultProperties
|
||||
@return the default properties stored in the setting file
|
||||
|
||||
Reference in New Issue
Block a user