mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
statistics: turn infobox into a QSGNode
A small step in converting from QGraphicsScene to QQuickItem. This is the second item to be converted (after the legend) and for now items are drawn in order of creation, which means that the infobox is on top of the legend. This will have to be made deterministic in follow-up commits. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
d7878dad36
commit
785d5189f6
8 changed files with 53 additions and 58 deletions
|
@ -4,6 +4,7 @@
|
|||
#include "statscolors.h"
|
||||
#include "statshelper.h"
|
||||
#include "statstranslations.h"
|
||||
#include "statsview.h"
|
||||
#include "zvalues.h"
|
||||
|
||||
#include <numeric>
|
||||
|
@ -246,7 +247,7 @@ bool PieSeries::hover(QPointF pos)
|
|||
if (highlighted >= 0 && highlighted < (int)items.size()) {
|
||||
items[highlighted].highlight(highlighted, true, (int)items.size());
|
||||
if (!information)
|
||||
information = createItemPtr<InformationBox>(scene);
|
||||
information = view.createChartItem<InformationBox>();
|
||||
information->setText(makeInfo(highlighted), pos);
|
||||
} else {
|
||||
information.reset();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue