mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-15 10:04:13 +02:00
Terminal: rename potential separation to function separation
The checkbox of a terminal element was an all-or-nothing switch: while it was unticked every conductor property (function, wire colour, section, number...) crossed to the other side of the terminal, and once it was ticked nothing did at all. Rename it to "Function separation" and let one property still cross: the voltage / protocol, which describes the electrical node itself rather than one side of it. Conductor::functionSeparatedConductors() returns the conductors reachable only by crossing such a terminal -- the potential computed with the separations ignored, minus the one that respects them -- and ConductorProperties::applyTensionProtocolChange() gives them that one property, in the conductor properties dialog, the selection panel multi-edit, the script API and search/replace. The stored element information stays "potential_isolating", so existing symbols and projects keep their setting, and the existing sub-case of terminals sharing a potential-group identifier is untouched. The German translation of the new label is deliberately left out of this commit and belongs with the other .ts updates.
This commit is contained in:
@@ -823,6 +823,25 @@ 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.
|
||||
@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