Sample editor back working.

This commit is contained in:
James Grogan 2022-11-17 08:39:49 +00:00
parent 722bda2801
commit 7ad237edc1
10 changed files with 59 additions and 36 deletions

View file

@ -8,6 +8,8 @@
#include <memory>
#include <iostream>
class FontsManager;
class AbstractVisualNode
@ -54,6 +56,7 @@ public:
void setIsVisible(bool isVisible)
{
//std::cout << "Setting " << mName << " visibility to " << isVisible << std::endl;
mIsVisible = isVisible;
}
@ -77,6 +80,15 @@ public:
return mIsVisible;
}
void setLocation(const DiscretePoint& loc)
{
if (mLocation != loc)
{
mTransformIsDirty = true;
mLocation = loc;
}
}
protected:
DiscretePoint mLocation;
std::unique_ptr<SceneItem> mSceneItem;

View file

@ -52,15 +52,6 @@ void RectangleNode::setHeight(unsigned height)
}
}
void RectangleNode::setLocation(const DiscretePoint& loc)
{
if (mLocation != loc)
{
mTransformIsDirty = true;
mLocation = loc;
}
}
void RectangleNode::update(FontsManager* fontsManager)
{
if (!mSceneItem || mGeometryIsDirty)

View file

@ -17,7 +17,6 @@ public:
void setWidth(unsigned width);
void setHeight(unsigned height);
void setLocation(const DiscretePoint& loc);
void update(FontsManager* fontsManager) override;
private: