Commit Graph

75 Commits

Author SHA1 Message Date
ispyisail 762bd7febf Fix bugtracker #333: selecting several dynamic texts overwrites their colours
Selecting more than one dynamic text field in the element editor silently
replaced every selected field's colour with the colour of the first one.
Nothing was clicked -- merely extending the selection destroyed the others'
colours, and the change went onto the undo stack as if the user had asked
for it.

Cause: updateForm() loads the current part's colour into the colour button
with m_color_kpb->setColor(). KColorButton::changed is emitted for a
programmatic setColor() just as it is for user interaction, and it is
connected to m_color_kpb_changed(), which applies the new colour to *every*
part in m_parts. So simply displaying the first part's colour wrote that
colour to all the others.

Every other widget in updateForm() is immune because it is wired to a
user-only signal -- on_m_x_sb_editingFinished(), on_m_frame_cb_clicked() --
which setValue() and setChecked() do not emit. The colour button is the one
control whose signal cannot distinguish the two, so block it while loading.

This also explains why the reporter saw it only when rubber-band selecting
bottom-to-top: the write happens only when the first part's colour differs
from what the button already shows, which depends on selection order.

Verified in the element editor with two dynamic texts, one red and one blue:
select the red one, then ctrl-click the blue one. Before: the blue text
turned red. After: both keep their colours. Changing the colour deliberately
with the button still applies to all selected texts, as intended.
2026-08-12 15:53:30 +12:00
Levi Jetzer 615e40dee2 Feature added: Rotation point center property for dynamic text fields
Now a new checkbox in the dynamictextfieldeditor is available (by default set to false for legacy) to make it possible to turn dynamic text fields around its own center.
This resolves an undesirable behaviour that occurs when the text alignment is retained

Including translation to english and german
2026-08-08 11:10:36 +02:00
Kellermorph 4c1f82f814 Fix-PLC-Manager 2026-07-31 21:02:07 +02:00
Laurent Trinques 717c89fa66 Merge pull request #562 from Kellermorph/PLC-Manager
PLC Manager
2026-07-31 09:05:30 +02:00
ispyisail b60e73d93b Fix #487: drag-selecting dynamic text fields silently converts their text source
updateForm() called on_m_text_from_cb_activated() directly, intending
only to enable the sibling widget matching the combo box's current
index ("For enable the good widget"). But that slot also loops over
every currently selected part and pushes an undo command overwriting
textFrom on any part that doesn't match, since it's normally only
reached via the combo box's own activated(int) signal (real user
interaction, never fired by programmatic setCurrentIndex()).

updateForm() runs on every selection change, so during a rubber-band
drag over dynamic text fields with different sources, each time a new
field enters the selection, the representative part's textFrom gets
force-applied to every other selected part - converting e.g. a
UserText field to ElementInfo mid-drag, before the user has released
the mouse or interacted with the combo box at all.

Split the cosmetic widget-enable logic into updateTextFromWidgetsEnabled(),
called from updateForm(). on_m_text_from_cb_activated() keeps the
part-mutating loop, now only reached from real user activation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-30 19:11:25 +12:00
Kellermorph b3a8ae898e PLC Manager 2026-07-27 22:16:52 +02:00
Kellermorph f416c2a97e New element: Line definition 2026-05-21 20:47:44 +02:00
Laurent Trinques 4044d04cc5 One year
Auto-build doxygen docs / doxygen (push) Has been cancelled
Auto-build doxygen docs / deploy (push) Has been cancelled
2026-01-16 15:24:35 +01:00
plc-user c1559d2a99 Fix signal for KColorButton 2025-03-28 20:16:37 +01:00
Laurent Trinques 43f0107eb1 Revert "Try Clazy fix-its"
Segfault on old Qt versions!
This reverts commit dba7caed30.
2025-02-14 16:17:58 +01:00
Laurent Trinques dba7caed30 Try Clazy fix-its
clazy is a compiler plugin which allows clang to understand Qt
semantics. You get more than 50 Qt related compiler warnings, ranging
from unneeded memory allocations to misusage of API, including fix-its
for automatic refactoring.

https://invent.kde.org/sdk/clazy
2025-02-14 15:52:23 +01:00
Laurent Trinques 77bfe84a4c One year 2025-01-04 13:37:40 +01:00
Achim 3438ba9ab3 composite text of report element corrected
In the ElementEditor, incorrect variables were displayed for
CompositeText in ReportElements.  This is corrected here
2024-12-31 21:58:42 +01:00
Achim e73aa3b84d ComboBox change sorting
alphabetical sorting in the ComboBox changed according to the order in
the elementInfoKeys list
2024-12-31 08:40:03 +01:00
Laurent Trinques 31ed09f185 Revert "Try to fix https://github.com/qelectrotech/qelectrotech-source-mirror/"
This reverts commit 3992c60c45.
2024-12-22 16:17:32 +01:00
Laurent Trinques 3992c60c45 Try to fix https://github.com/qelectrotech/qelectrotech-source-mirror/
pull/314
2024-12-22 14:25:30 +01:00
Laurent Trinques 34cc26a325 Revert "ElementEditor elmt_info_cb sorting changed" 2024-12-21 12:59:43 +01:00
Achim 7b50f10749 ElementEditor elmt_info_cb sorting changed
alphabetical sorting in the ComboBox changed according to the order in
the elementInfoKeys list
2024-12-08 19:36:22 +01:00
Laurent Trinques e73cf633ce 2023->2024 2024-03-29 10:09:48 +01:00
Laurent Trinques 9afef79629 Update Copyright date 2023-01-01 17:05:57 +01:00
luz paz 1994235bc5 Fix various typos in source documentation and comments (cont.)
Found via `codespell`
2022-12-04 20:46:32 +01:00
joshua 0d90defcfe Remove unused include 2022-09-28 21:54:02 +02:00
joshua ffc2a7a7d7 Fix warning 2022-09-26 21:48:08 +02:00
joshua 3e75bedef0 Fix crash
https://qelectrotech.org/forum/viewtopic.php?pid=16647#p16647
2022-09-26 21:40:47 +02:00
joshua 74dcf96e4b Element editor: make element text option "keep visual rotation" editable. 2021-05-08 22:14:15 +02:00
joshua 11b8ef927b Revert "Merge branch 'XMLPropertiesNew'"
**Break a lot of thing.**

This reverts commit 1db1800572, reversing
changes made to 4c563821e8.
2021-03-11 19:52:50 +01:00
Martin Marmsoler ea793125a5 move m_change_connections to ElementItemEditor, so it must not be defined by every editor it self 2021-03-05 20:59:36 +01:00
Martin bc88f2ec2e reimplement Priv function, so the ElementEditor gets called automatically 2021-03-05 17:38:51 +01:00
joshua 8f85cacb06 QetElementEditor : Use elementData class 2021-02-21 19:40:33 +01:00
joshua 24ec94d73e QetElementEditor : rewrite gui with ui file 2021-02-21 19:40:32 +01:00
Laurent Trinques ef58f34c14 Update Copyright date 2021-02-20 12:13:46 +01:00
joshua 30858f9a4d Minor fix :
Combobox "information of element" don't display the real information set
to the dynamic text field
2021-02-15 18:53:22 +01:00
joshua 2513961cd6 Revert "Update Copyright date"
This reverts commit d04bccc384.
2021-02-06 19:00:48 +01:00
Laurent Trinques d04bccc384 Update Copyright date 2021-02-06 18:33:42 +01:00
joshua e1b98ce5b5 Revert "QetElementEditor : rewrite gui with ui file"
This reverts commit e3db2bc898.
2021-02-01 19:52:15 +01:00
joshua e3db2bc898 QetElementEditor : rewrite gui with ui file 2021-01-30 19:34:21 +01:00
joshua 0a616088ea Dynamic text field editor : move kcolorbutton from ui file to cpp file
Kcolorbutton is not available in Qt6 for now.
We move it from the ui file to the cpp file for choose at compilation if
qet must use kcolorbutton or not.
2021-01-07 18:56:25 +01:00
Simon De Backer d3093f495b Revert "Mod DynamicTextFieldEditor"
This reverts commit f6d777e2f7.

it is preferable to keep the gui in the ui file
QT6 will have to wait.
2021-01-04 20:37:17 +01:00
joshua 546db38683 Fix fail to build 2020-12-17 23:39:04 +01:00
Simon De Backer f6d777e2f7 Mod DynamicTextFieldEditor
the ui file is written in the Dynamic Text Field Editor class
Add switch for KF5 (QT6)
2020-12-17 21:42:18 +01:00
Simon De Backer cb37c1c2fe Add switch for KF5 (QT6) and Mod Cmake
if we want to test QET on QT6, KF5 must be removed from the code,
this switch is for that,

this is for testing only
2020-12-16 23:06:08 +01:00
Simon De Backer 6da9c58458 Wip Fix preprocessor on Cmake 2020-12-10 21:19:45 +01:00
Simon De Backer d15443cf93 Wip Fix preprocessor on Cmake 2020-12-10 18:49:35 +01:00
Simon De Backer d0c129478e Mod Cmake en preprocessor 2020-12-10 00:08:26 +01:00
Claveau Joshua af7d1df5ab Replace function by another one.
Replace function QETApp::elementInfoKeys() and
QETApp::elementInfoToVar(const QString &info) by function provided by
QETInformation.
2020-11-14 19:09:40 +01:00
Claveau Joshua 81efc5181b Minor replace function by another one
Replace QETApp::conductorInfoKeys() and
QETApp::conductorTranslatedInfoKey(const QString &key) by
QETInformation::conductorInfoKeys() and
QETInformation::translatedInfoKey
2020-11-08 19:44:21 +01:00
Claveau Joshua 7882c5734a Minor : fix little regression about folio report and displayed information 2020-11-08 19:05:11 +01:00
Simon De Backer 5d92393ee7 Wrap code for better readability 2020-09-07 22:03:40 +02:00
Simon De Backer 9dad8a5d01 Fix Bug Fill the combo box "element information" was not called
a typo it happens :)
See commit
216374d27c
2020-08-23 17:47:53 +02:00
Simon De Backer 0c00d83b27 Fix some doxygen issues 2020-08-20 21:57:35 +02:00