Commit Graph

8 Commits

Author SHA1 Message Date
ispyisail cb5247e07c Place a template under the cursor, and list it as soon as it is saved
A template (.qetmak) was previewed and placed offset from the cursor by
the position its items had on the folio it was saved from: the preview
pixmap kept that offset, and addMacro() added it back before handing the
position to fromXml(). A template saved from the middle or the lower
right of a folio therefore landed far below and to the right of the
click, often off the folio, which reads as "the template does not drop"
(forum topic 3190). Anchor both the preview and the placement on the
template's own top-left corner instead.

fromXml() skips translating for a null position, so a click on the folio
origin is nudged by a fraction of a pixel that the grid snap removes.

Also:
- a template saved with "Create a template" only appeared in the
  templates tab after reloading the collections or restarting; it is
  now added to the tab of every open editor when it is saved;
- the placement status bar message ended in an untranslated
  "(Makro-Anker)"; it now reads "x : y" like element placement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 13:47:45 +13:00
Kellermorph 2efce1752d fix: correct macro placement position mismatch
Fix macro elements jumping to upper-left corner instead of being placed
at the correct drop position.

Root cause: The preview offset used itemsBoundingRect() (all items
including children), while Diagram::fromXml() computed its translation
offset from top-level items only. This mismatch caused fromXml to
translate elements to the wrong position.

Changes:
- Compute top-level-only bounding rect in dummy diagram constructor
  to get the correct m_items_top_left reference point
- Pass final_pos + m_items_top_left to fromXml() so the internal
  translation yields the intended final position
- Add braces around single-statement for-loop in fromXml
- Remove empty else block leftovers from debug cleanup
2026-09-20 21:24:38 +02:00
Kellermorph 0c2cf409f8 Fix macro drag-and-drop placement and preview for Qt6 2026-09-13 10:09:44 +02:00
Andre Rummler 7ba295a339 Remove all Qt version checks and branches for <5.14.0 as such versions are no longer supported. 2026-08-13 15:45:15 +02:00
Kellermorph 946aa37e78 delete german notes 2026-04-29 16:17:49 +02:00
Kellermorph b8c85f9e96 Fix placing Template 2026-04-29 16:15:58 +02:00
Kellermorph 1d451a6490 Fix include paths for NameList header 2026-04-26 13:01:19 +02:00
Kellermorph 0118d94d4e makro 2026-04-26 10:48:47 +02:00