From a5dd0acc58fdee833c6321412fbd675f235fb077 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Thu, 7 Nov 2019 14:53:40 +0000 Subject: [PATCH] - make Visible and set bounds git-svn-id: http://moon:8086/svn/software/trunk/projects/Rbm@622 b431acfa-c32f-4a4a-93f1-934dc6c82436 --- source/DrawComponent.cpp | 3 --- source/MainComponent.hpp | 4 +++- source/RbmComponent.cpp | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/DrawComponent.cpp b/source/DrawComponent.cpp index 0be0ce5..1671d79 100644 --- a/source/DrawComponent.cpp +++ b/source/DrawComponent.cpp @@ -48,9 +48,6 @@ DrawComponent::DrawComponent (int width, int height, float offset, float scale) //[Constructor] You can add your own custom stuff here.. -// m_pG = new Graphics(m_image); - m_data.resize(width*height); - m_pG->setImageResamplingQuality(Graphics::lowResamplingQuality); clear(); //[/Constructor] diff --git a/source/MainComponent.hpp b/source/MainComponent.hpp index fcc2f15..b9fcab8 100644 --- a/source/MainComponent.hpp +++ b/source/MainComponent.hpp @@ -73,7 +73,9 @@ public: Layer* onConstruct(const std::string &name, size_t id, size_t numVisibleX, size_t numVisibleY, size_t numHidden) { - return new RbmComponent(name, id, numVisibleX, numVisibleY, numHidden); + RbmComponent *pComp = new RbmComponent(name, id, numVisibleX, numVisibleY, numHidden); + addAndMakeVisible(pComp); + return pComp; } private: diff --git a/source/RbmComponent.cpp b/source/RbmComponent.cpp index fc740fb..f77127a 100644 --- a/source/RbmComponent.cpp +++ b/source/RbmComponent.cpp @@ -47,6 +47,7 @@ RbmComponent::RbmComponent (const std::string &name, size_t id, size_t numVisibl setSize (430, 130); resized(); + setBounds (16, 140*id+16, 430, 130); } RbmComponent::~RbmComponent()