From f62ce7e4ca98b076bc776a18d27df5bd528a4544 Mon Sep 17 00:00:00 2001 From: Kellermorph Date: Fri, 10 Jul 2026 14:36:47 +0200 Subject: [PATCH] Update terminal name --- sources/editor/ui/terminaleditor.cpp | 17 +++++++++++++++++ sources/qetgraphicsitem/terminal.cpp | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/sources/editor/ui/terminaleditor.cpp b/sources/editor/ui/terminaleditor.cpp index f34a0f8bc..45682c1d9 100644 --- a/sources/editor/ui/terminaleditor.cpp +++ b/sources/editor/ui/terminaleditor.cpp @@ -1,3 +1,20 @@ +/* + Copyright 2006-2026 The QElectroTech Team + This file is part of QElectroTech. + + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . +*/ #include "terminaleditor.h" #include "ui_terminaleditor.h" #include "../../qeticons.h" diff --git a/sources/qetgraphicsitem/terminal.cpp b/sources/qetgraphicsitem/terminal.cpp index 661a5bb27..7b0f58be3 100644 --- a/sources/qetgraphicsitem/terminal.cpp +++ b/sources/qetgraphicsitem/terminal.cpp @@ -280,7 +280,7 @@ void Terminal::paint( painter->setFont(d->m_label_font); painter->setPen(d->m_label_color); - QPointF label_pos = d->m_label_pos; + QPointF label_pos = d->m_pos + d->m_label_pos; QFontMetrics fm(d->m_label_font); QSizeF text_size = fm.size(Qt::TextSingleLine, d->m_name); @@ -384,7 +384,7 @@ QRectF Terminal::boundingRect() const { QFontMetrics fm(d->m_label_font); QSizeF text_size = fm.size(Qt::TextSingleLine, d->m_name); - QPointF label_pos = d->m_label_pos; + QPointF label_pos = d->m_pos + d->m_label_pos; qreal dx = 0, dy = 0; if (d->m_label_halignment & Qt::AlignLeft) dx = 0;