mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-13 10:04:13 +02:00
6ad2a63575
NewElementWizard::createNewElement() creates and show()s a QETElementEditor for the freshly-created part, but never calls raise()/activateWindow(). On the reporter's macOS setup, the wizard (a modal sheet/child of the main window) closing right before the new editor is shown apparently leaves the main window as the active/key window, so the new editor window is created but stays behind it -- and, being neither key nor frontmost, it also never surfaces in the Dock's window list or the app's own Windows menu. This matched the report exactly: the reporter saw the wizard finish with seemingly no result, when in fact a new part genuinely was created and its editor genuinely was opened, just hidden from view. Fix: explicitly raise() and activateWindow() the new editor after show(), so it becomes the frontmost/key window regardless of what state the wizard leaves the main window in. Verified: clean rebuild, only the intended object file recompiled and linked successfully. Ran the full wizard flow live under Xvfb on Linux (right-click user collection > "Nouvel élément" > through all 3 steps > Finish) and confirmed the element editor opens correctly with a blank new part, with no regression in the flow. Not verified: the actual reported symptom is macOS-specific window-manager behavior (key/frontmost window handling, Dock window-list registration), which cannot be reproduced or confirmed fixed in this Linux/Xvfb sandbox -- no macOS or Wine-with-Cocoa environment is available here. raise()/ activateWindow() are the standard cross-platform Qt calls for this exact problem and match the pattern already used elsewhere in the codebase (QETApp::openElementLocations()'s already-open-editor branch), so confidence rests on that precedent rather than a macOS-side confirmation.