@@ -18,25 +18,24 @@ SpherePanel::SpherePanel(QWidget *parent): QGroupBox("Reflective spheres", paren
18
18
19
19
content->addSpacing (10 );
20
20
21
- QFrame *spheres_frame = new QFrame;
22
-
23
- QPushButton *sphere = new QPushButton (QIcon::fromTheme (" folder" ), " New reflective sphere..." );
24
- sphere->setProperty (" class" , " large" );
25
- sphere->setMinimumWidth (200 );
26
- sphere->setMaximumWidth (300 );
27
- connect (sphere, SIGNAL (clicked ()), this , SLOT (newSphere ()));
28
- content->addWidget (sphere, 0 , Qt::AlignTop);
29
-
30
- content->addWidget (spheres_frame);
31
-
32
- spheres = new QVBoxLayout (spheres_frame);
33
-
34
- QHBoxLayout *buttons = new QHBoxLayout;
35
- content->addLayout (buttons);
21
+ {
22
+ QPushButton *sphere = new QPushButton (QIcon::fromTheme (" folder" ), " New reflective sphere..." );
23
+ sphere->setProperty (" class" , " large" );
24
+ sphere->setMinimumWidth (200 );
25
+ sphere->setMaximumWidth (300 );
26
+ connect (sphere, SIGNAL (clicked ()), this , SLOT (newSphere ()));
27
+ content->addWidget (sphere, 0 , Qt::AlignTop);
28
+ }
29
+ {
30
+ QFrame *spheres_frame = new QFrame;
31
+ spheres = new QVBoxLayout;
32
+ spheres_frame->setLayout (spheres);
33
+ content->addWidget (spheres_frame);
34
+ }
36
35
}
37
36
38
37
void SpherePanel::clear () {
39
- setVisible (false );
38
+ // setVisible(false);
40
39
while (spheres->count () > 0 ) {
41
40
QLayoutItem *item = spheres->takeAt (0 );
42
41
SphereRow *row = dynamic_cast <SphereRow *>(item->widget ());
@@ -47,7 +46,7 @@ void SpherePanel::clear() {
47
46
48
47
void SpherePanel::init () {
49
48
auto &project_spheres = qRelightApp->project ().spheres ;
50
- setVisible (project_spheres.size () > 0 );
49
+ // setVisible(project_spheres.size() > 0);
51
50
for (Sphere *sphere: project_spheres) {
52
51
sphere->fit ();
53
52
SphereRow * row = addSphere (sphere);
0 commit comments