mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
PopupWidget, Bugfix: put the mixer back into the frame at the same size it started from;
keeps it from oversetting neighbors when the dialog is closed.
This commit is contained in:
parent
b490fdb6e9
commit
6adafbc4bf
@ -37,6 +37,9 @@ void PopupWidget::setWidget(QWidget* widget)
|
||||
m_widget = widget;
|
||||
m_widgetParent = widget->parentWidget();
|
||||
|
||||
m_widgetWidth = m_widget->width();
|
||||
m_widgetHeight = m_widget->height();
|
||||
|
||||
m_layout->addWidget(m_widget);
|
||||
}
|
||||
|
||||
@ -59,6 +62,7 @@ void PopupWidget::closePopup()
|
||||
if (m_widget && m_widgetParent) {
|
||||
if(QGroupBox * w =qobject_cast<QGroupBox *>(m_widgetParent))
|
||||
{
|
||||
m_widget->resize(m_widgetWidth, m_widgetHeight);
|
||||
w->layout()->addWidget(m_widget);
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,8 @@ private:
|
||||
QWidget* m_widget;
|
||||
QWidget* m_widgetParent;
|
||||
QPushButton* m_closeButton;
|
||||
int m_widgetWidth;
|
||||
int m_widgetHeight;
|
||||
};
|
||||
|
||||
#endif // POPUPWIDGET_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user