##// END OF EJS Templates
Fix to domain initialization when log base was preset on axis before adding it to chart
Marek Rosa -
r2295:8468c10170a2
parent child
Show More
@@ -160,11 +160,15 bool LogXLogYDomain::attachAxis(QAbstractAxis* axis)
160 160 AbstractDomain::attachAxis(axis);
161 161 QLogValueAxis *logAxis = qobject_cast<QLogValueAxis *>(axis);
162 162
163 if(logAxis && logAxis->orientation()==Qt::Vertical)
163 if(logAxis && logAxis->orientation()==Qt::Vertical) {
164 164 QObject::connect(logAxis, SIGNAL(baseChanged(qreal)), this, SLOT(handleVerticalAxisBaseChanged(qreal)));
165 handleVerticalAxisBaseChanged(logAxis->base());
166 }
165 167
166 if(logAxis && logAxis->orientation()==Qt::Horizontal)
168 if(logAxis && logAxis->orientation()==Qt::Horizontal) {
167 169 QObject::connect(logAxis, SIGNAL(baseChanged(qreal)), this, SLOT(handleHorizontalAxisBaseChanged(qreal)));
170 handleHorizontalAxisBaseChanged(logAxis->base());
171 }
168 172
169 173 return true;
170 174 }
@@ -160,8 +160,10 bool LogXYDomain::attachAxis(QAbstractAxis* axis)
160 160 AbstractDomain::attachAxis(axis);
161 161 QLogValueAxis *logAxis = qobject_cast<QLogValueAxis *>(axis);
162 162
163 if(logAxis && logAxis->orientation()==Qt::Horizontal)
163 if(logAxis && logAxis->orientation()==Qt::Horizontal) {
164 164 QObject::connect(logAxis, SIGNAL(baseChanged(qreal)), this, SLOT(handleHorizontalAxisBaseChanged(qreal)));
165 handleHorizontalAxisBaseChanged(logAxis->base());
166 }
165 167
166 168 return true;
167 169 }
@@ -160,9 +160,10 bool XLogYDomain::attachAxis(QAbstractAxis* axis)
160 160 {
161 161 QLogValueAxis *logAxis = qobject_cast<QLogValueAxis *>(axis);
162 162
163 if(logAxis && logAxis->orientation()==Qt::Vertical)
163 if(logAxis && logAxis->orientation()==Qt::Vertical){
164 164 QObject::connect(logAxis, SIGNAL(baseChanged(qreal)), this, SLOT(handleVerticalAxisBaseChanged(qreal)));
165
165 handleVerticalAxisBaseChanged(logAxis->base());
166 }
166 167 return AbstractDomain::attachAxis(axis);
167 168 }
168 169
General Comments 0
You need to be logged in to leave comments. Login now