mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
EditDialog: Fix window positioning
The old code somehow stopped working for me...
This commit is contained in:
@@ -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<QDialog*>(parent());
|
||||
QMainWindow* parentDialog = qobject_cast<QMainWindow*>(parent());
|
||||
if(parentDialog)
|
||||
{
|
||||
QPoint parentCenter = parentDialog->window()->mapToGlobal(parentDialog->window()->rect().center());
|
||||
|
||||
Reference in New Issue
Block a user