From e833e491305aca0ad3bd64f693f6be06d3a162ca Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Sun, 23 Aug 2015 18:16:52 +0200 Subject: [PATCH] EditDialog: Fix window positioning The old code somehow stopped working for me... --- src/EditDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EditDialog.cpp b/src/EditDialog.cpp index 99c6325a..a7dea792 100644 --- a/src/EditDialog.cpp +++ b/src/EditDialog.cpp @@ -53,7 +53,7 @@ void EditDialog::showEvent(QShowEvent*) { // Whenever the dialog is shown, position it at the center of the parent dialog QPoint center = mapToGlobal(rect().center()); - QDialog* parentDialog = qobject_cast(parent()); + QMainWindow* parentDialog = qobject_cast(parent()); if(parentDialog) { QPoint parentCenter = parentDialog->window()->mapToGlobal(parentDialog->window()->rect().center());