Skip to content
Snippets Groups Projects
Commit a09d7d43 authored by Andreas Schenk's avatar Andreas Schenk
Browse files

fixed parent of DropBox to avoid problems with hiding it

parent be94a1db
Branches
Tags
No related merge requests found
......@@ -41,7 +41,7 @@ PanelBar::PanelBar(QWidget* parent) :
view_mode_menu_(new QMenu("View Mode",this)),
current_view_mode_(NULL),
widget_states_(),
drop_box_(new DropBox(this)),
drop_box_(new DropBox), // DropBox having no parent is done on purpose (otherwise it will not hide properly)
show_action_(new QAction(this))
{
connect(view_mode_menu_,SIGNAL(triggered(QAction*)),this,SLOT(ChangeViewMode(QAction*)));
......@@ -62,6 +62,11 @@ PanelBar::PanelBar(QWidget* parent) :
this->addAction(show_action_);
}
PanelBar::~PanelBar()
{
delete drop_box_; // manually destroy drop_box_ widget, as it has no parent.
}
void PanelBar::AddWidget(Widget* widget, bool is_hidden)
{
int index = this->GetIndex(widget);
......
......@@ -54,6 +54,7 @@ class DLLEXPORT_OST_GUI PanelBar : public Widget {
Q_OBJECT
public:
PanelBar(QWidget* parent);
virtual ~PanelBar();
virtual bool Save(const QString& prefix);
virtual bool Restore(const QString& prefix);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment