mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-04-03 18:49:59 +02:00
Translate comments to English and clarify filtering logic
This commit is contained in:
@@ -386,17 +386,17 @@ QVector <QPointer<Element>> LinkSingleElementWidget::availableElements()
|
|||||||
|
|
||||||
//If element is linked, remove is parent from the list
|
//If element is linked, remove is parent from the list
|
||||||
if(!m_element->isFree()) elmt_vector.removeAll(m_element->linkedElements().first());
|
if(!m_element->isFree()) elmt_vector.removeAll(m_element->linkedElements().first());
|
||||||
// NEU: Filtere volle Master-Elemente aus der Liste heraus
|
// Filter out all master elements from the list
|
||||||
for (int i = elmt_vector.size() - 1; i >= 0; --i) {
|
for (int i = elmt_vector.size() - 1; i >= 0; --i) {
|
||||||
Element *elmt = elmt_vector.at(i);
|
Element *elmt = elmt_vector.at(i);
|
||||||
|
|
||||||
// Wenn das Element in der Liste ein Master ist
|
// If the item in the list is a master
|
||||||
if (elmt->linkType() == Element::Master) {
|
if (elmt->linkType() == Element::Master) {
|
||||||
|
|
||||||
// Wir wandeln den generischen Element-Pointer in einen MasterElement-Pointer um
|
// We convert the generic element pointer into a MasterElement pointer
|
||||||
MasterElement *master = static_cast<MasterElement*>(elmt);
|
MasterElement *master = static_cast<MasterElement*>(elmt);
|
||||||
|
|
||||||
// Wenn der Master voll ist, werfen wir ihn aus der Liste!
|
// If the master is full, we'll remove it from the list!
|
||||||
if (master->isFull()) {
|
if (master->isFull()) {
|
||||||
elmt_vector.removeAt(i);
|
elmt_vector.removeAt(i);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user