const double oldPos = win->m_pos;
win->m_pos = value;
- if (!win->m_hasVMT || g_blockEventsOnDrag)
+ if (g_blockEventsOnDrag)
return;
if (win->GTKEventsDisabled())
wxSlider::wxSlider()
{
- m_pos = 0;
- m_scrollEventType = GTK_SCROLL_NONE;
- m_needThumbRelease = false;
- m_blockScrollEvent = false;
+ m_scale = NULL;
+}
+
+wxSlider::~wxSlider()
+{
+ if (m_scale && m_scale != m_widget)
+ GTKDisconnect(m_scale);
}
bool wxSlider::Create(wxWindow *parent,
{
m_pos = value;
m_scrollEventType = GTK_SCROLL_NONE;
+ m_needThumbRelease = false;
+ m_blockScrollEvent = false;
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, validator, name ))