mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-13 10:04:13 +02:00
Merge pull request #715 from ispyisail/fix/properties-dialog-mac-sheet-bug275
Fix bugtracker #275: element properties window stuck centered on macOS That addition definitely makes sense!
This commit is contained in:
@@ -46,6 +46,18 @@ class PropertiesEditorDialog : public QDialog
|
|||||||
PropertiesEditorDialog(T editor, QWidget *parent = nullptr) :
|
PropertiesEditorDialog(T editor, QWidget *parent = nullptr) :
|
||||||
QDialog (parent)
|
QDialog (parent)
|
||||||
{
|
{
|
||||||
|
// Without this, a QWidget-modal QDialog with a parent falls
|
||||||
|
// back to macOS's automatic sheet presentation, which some
|
||||||
|
// Qt/Cocoa versions render stuck centered on screen and
|
||||||
|
// non-draggable rather than as a proper attached sheet
|
||||||
|
// (bugtracker #275). Other dialogs in this codebase already
|
||||||
|
// opt in explicitly (see ElementDialog, DiagramPropertiesDialog)
|
||||||
|
// -- this one was missing it.
|
||||||
|
setWindowModality(Qt::WindowModal);
|
||||||
|
#ifdef Q_OS_MACOS
|
||||||
|
setWindowFlags(Qt::Sheet);
|
||||||
|
#endif
|
||||||
|
|
||||||
//Set dialog title
|
//Set dialog title
|
||||||
setWindowTitle(editor->title());
|
setWindowTitle(editor->title());
|
||||||
// Reparent the editor,
|
// Reparent the editor,
|
||||||
|
|||||||
Reference in New Issue
Block a user