src/polygoncache.h

Wed, 20 Jul 2022 12:59:07 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Wed, 20 Jul 2022 12:59:07 +0300
changeset 335
c5830bce1c23
parent 333
07e65a4c6611
child 338
719b909a7d2b
permissions
-rw-r--r--

Fix crashing
Add option to set tool button style

#pragma once
#include <QTextDocument>
#include "src/basics.h"
#include "src/model.h"
#include "src/gl/common.h"

template<typename T>
struct WithId : T
{
	std::int32_t linenumber;
};

struct PolygonCache
{
	using vector_type = std::vector<WithId<PolygonElement>>;
	vector_type polygons;
	bool needRecache = true;
};

void recacheIfNeeded(
	PolygonCache* cache,
	Model* model,
	class DocumentManager* documents);
PolygonCache* findPolygonCacheForModel(QTextDocument* model, DocumentManager* context);

mercurial