##// END OF EJS Templates
bugfix: notifying legend before barchartitem caused crash in some situations
sauimone -
r1437:880bb87d5c97
parent child
Show More
@@ -587,10 +587,10 bool QBarSeriesPrivate::append(QBarSet *set)
587 587 m_barSets.append(set);
588 588 QObject::connect(set->d_ptr.data(), SIGNAL(updatedBars()), this, SIGNAL(updatedBars()));
589 589 QObject::connect(set->d_ptr.data(), SIGNAL(restructuredBars()), this, SIGNAL(restructuredBars()));
590 emit restructuredBars(); // this notifies barchartitem
590 591 if (m_dataset) {
591 592 m_dataset->updateSeries(q); // this notifies legend
592 593 }
593 emit restructuredBars(); // this notifies barchartitem
594 594 return true;
595 595 }
596 596
@@ -604,10 +604,10 bool QBarSeriesPrivate::remove(QBarSet *set)
604 604 m_barSets.removeOne(set);
605 605 QObject::disconnect(set->d_ptr.data(), SIGNAL(updatedBars()), this, SIGNAL(updatedBars()));
606 606 QObject::disconnect(set->d_ptr.data(), SIGNAL(restructuredBars()), this, SIGNAL(restructuredBars()));
607 emit restructuredBars(); // this notifies barchartitem
607 608 if (m_dataset) {
608 609 m_dataset->updateSeries(q); // this notifies legend
609 610 }
610 emit restructuredBars(); // this notifies barchartitem
611 611 return true;
612 612 }
613 613
@@ -630,10 +630,10 bool QBarSeriesPrivate::append(QList<QBarSet* > sets)
630 630 QObject::connect(set->d_ptr.data(), SIGNAL(updatedBars()), this, SIGNAL(updatedBars()));
631 631 QObject::connect(set->d_ptr.data(), SIGNAL(restructuredBars()), this, SIGNAL(restructuredBars()));
632 632 }
633 emit restructuredBars(); // this notifies barchartitem
633 634 if (m_dataset) {
634 635 m_dataset->updateSeries(q); // this notifies legend
635 636 }
636 emit restructuredBars(); // this notifies barchartitem
637 637 return true;
638 638 }
639 639
@@ -660,10 +660,10 bool QBarSeriesPrivate::remove(QList<QBarSet* > sets)
660 660 QObject::disconnect(set->d_ptr.data(), SIGNAL(restructuredBars()), this, SIGNAL(restructuredBars()));
661 661 }
662 662
663 emit restructuredBars(); // this notifies barchartitem
663 664 if (m_dataset) {
664 665 m_dataset->updateSeries(q); // this notifies legend
665 666 }
666 emit restructuredBars(); // this notifies barchartitem
667 667 return true;
668 668 }
669 669
@@ -677,10 +677,10 bool QBarSeriesPrivate::insert(int index, QBarSet *set)
677 677 m_barSets.insert(index, set);
678 678 QObject::connect(set->d_ptr.data(), SIGNAL(updatedBars()), this, SIGNAL(updatedBars()));
679 679 QObject::connect(set->d_ptr.data(), SIGNAL(restructuredBars()), this, SIGNAL(restructuredBars()));
680 emit restructuredBars(); // this notifies barchartitem
680 681 if (m_dataset) {
681 682 m_dataset->updateSeries(q); // this notifies legend
682 683 }
683 emit restructuredBars(); // this notifies barchartitem
684 684 return true;
685 685 }
686 686
General Comments 0
You need to be logged in to leave comments. Login now