Commit ded94d78 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/preferences_widgets.cpp/h: work around a wxSpinCtrl recursion bug in wxGTK.

parent 2da750df
...@@ -533,6 +533,7 @@ IntegerConfigControl::IntegerConfigControl( vlc_object_t *p_this, ...@@ -533,6 +533,7 @@ IntegerConfigControl::IntegerConfigControl( vlc_object_t *p_this,
sizer->Add( spin, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 ); sizer->Add( spin, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
sizer->Layout(); sizer->Layout();
this->SetSizerAndFit( sizer ); this->SetSizerAndFit( sizer );
i_value = p_item->i_value;
} }
IntegerConfigControl::~IntegerConfigControl() IntegerConfigControl::~IntegerConfigControl()
...@@ -542,7 +543,15 @@ IntegerConfigControl::~IntegerConfigControl() ...@@ -542,7 +543,15 @@ IntegerConfigControl::~IntegerConfigControl()
int IntegerConfigControl::GetIntValue() int IntegerConfigControl::GetIntValue()
{ {
return spin->GetValue(); /* We avoid using GetValue because of a recursion bug with wxSpinCtrl with
* wxGTK. */
return i_value; //spin->GetValue();
}
void IntegerConfigControl::OnUpdate( wxCommandEvent &event )
{
i_value = event.GetInt();
ConfigControl::OnUpdate( event );
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -133,6 +133,9 @@ public: ...@@ -133,6 +133,9 @@ public:
virtual int GetIntValue(); virtual int GetIntValue();
private: private:
wxSpinCtrl *spin; wxSpinCtrl *spin;
int i_value;
void OnUpdate( wxCommandEvent& );
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment