Add missing parent for messagebox and other popups
Unparented popups can easily get lost in backround, but they still block top level event loop when run with ::exec() thus preventing interactions with main window. This mainly happens on wayland. Setting the parent ensures they are always kept on top and reasonably positioned.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#endif // #ifndef _PreCmp_
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
|
||||
#include <Mod/TechDraw/App/DrawTemplate.h>
|
||||
#include <Mod/TechDraw/App/DrawSVGTemplate.h>
|
||||
@@ -73,7 +74,7 @@ void TemplateTextField::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||
if ( tmplte && m_rect->rect().contains(event->pos()) ) {
|
||||
event->accept();
|
||||
|
||||
DlgTemplateField ui;
|
||||
DlgTemplateField ui(Gui::getMainWindow());
|
||||
|
||||
ui.setFieldName(fieldNameStr);
|
||||
ui.setFieldContent(tmplte->EditableTexts[fieldNameStr]);
|
||||
|
||||
Reference in New Issue
Block a user