Commit ac1fa483 authored by Christophe Mutricy's avatar Christophe Mutricy

Compile fix. gcc doesn't like foo=foo();

parent b48e3d28
...@@ -41,13 +41,13 @@ DirectSlider( Qt::Orientation q,QWidget *_parent ) : QSlider( q,_parent ) ...@@ -41,13 +41,13 @@ DirectSlider( Qt::Orientation q,QWidget *_parent ) : QSlider( q,_parent )
if(event->button() == Qt::LeftButton) if(event->button() == Qt::LeftButton)
{ {
#ifdef WIN32 #ifdef WIN32
int width = qobject_cast<QWidget*>(parent())->sizeHint().width() - int width1 = qobject_cast<QWidget*>(parent())->sizeHint().width() -
2 * qobject_cast<QWidget*>(parent())->layout()->margin(); 2 * qobject_cast<QWidget*>(parent())->layout()->margin();
#else #else
int width = width(); int width1 = width();
#endif #endif
int pos = (int)(minimum() + int pos = (int)(minimum() +
(double)(event->x())/width*(maximum()-minimum()) ); (double)(event->x())/width1*(maximum()-minimum()) );
setSliderPosition( pos ); setSliderPosition( pos );
QSlider::mousePressEvent(event); QSlider::mousePressEvent(event);
} }
......
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