@@ -514,19 +514,22 void QBarCategoryAxisPrivate::setRange(const QString &minCategory, const QStrin | |||||
514 | emit q->maxChanged(maxCategory); |
|
514 | emit q->maxChanged(maxCategory); | |
515 | emit q->rangeChanged(m_minCategory, m_maxCategory); |
|
515 | emit q->rangeChanged(m_minCategory, m_maxCategory); | |
516 | emit rangeChanged(m_min,m_max); |
|
516 | emit rangeChanged(m_min,m_max); | |
|
517 | return; | |||
517 | } |
|
518 | } | |
518 |
|
519 | |||
519 | if (m_categories.indexOf(maxCategory) < m_categories.indexOf(minCategory)) |
|
520 | if (m_categories.indexOf(maxCategory) < m_categories.indexOf(minCategory)) | |
520 | return; |
|
521 | return; | |
521 |
|
522 | |||
522 |
if (!minCategory.is |
|
523 | if (!minCategory.isNull() && (m_minCategory != minCategory || m_minCategory.isNull()) | |
|
524 | && m_categories.contains(minCategory)) { | |||
523 | m_minCategory = minCategory; |
|
525 | m_minCategory = minCategory; | |
524 | m_min = m_categories.indexOf(m_minCategory) - 0.5; |
|
526 | m_min = m_categories.indexOf(m_minCategory) - 0.5; | |
525 | changed = true; |
|
527 | changed = true; | |
526 | emit q->minChanged(minCategory); |
|
528 | emit q->minChanged(minCategory); | |
527 | } |
|
529 | } | |
528 |
|
530 | |||
529 |
if (!maxCategory.is |
|
531 | if (!maxCategory.isNull() && (m_maxCategory != maxCategory || m_maxCategory.isNull()) | |
|
532 | && m_categories.contains(maxCategory)) { | |||
530 | m_maxCategory = maxCategory; |
|
533 | m_maxCategory = maxCategory; | |
531 | m_max = m_categories.indexOf(m_maxCategory) + 0.5; |
|
534 | m_max = m_categories.indexOf(m_maxCategory) + 0.5; | |
532 | changed = true; |
|
535 | changed = true; |
General Comments 0
You need to be logged in to leave comments.
Login now