Skip to content

Commit 31c178b

Browse files
committed
PaintBrush: Start the app with an "empty" single layer image :^)
1 parent 40a7288 commit 31c178b

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

Applications/PaintBrush/main.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -169,17 +169,7 @@ int main(int argc, char** argv)
169169

170170
auto bg_layer = PaintBrush::Layer::create_with_size({ 640, 480 }, "Background");
171171
image->add_layer(*bg_layer);
172-
bg_layer->bitmap().fill(Color::Magenta);
173-
174-
auto fg_layer_1 = PaintBrush::Layer::create_with_size({ 200, 100 }, "Foreground 1");
175-
image->add_layer(*fg_layer_1);
176-
fg_layer_1->set_location({ 20, 10 });
177-
fg_layer_1->bitmap().fill(Color::Green);
178-
179-
auto fg_layer_2 = PaintBrush::Layer::create_with_size({ 64, 64 }, "Foreground 2");
180-
image->add_layer(*fg_layer_2);
181-
fg_layer_2->set_location({ 300, 350 });
182-
fg_layer_2->bitmap().fill(Color::Yellow);
172+
bg_layer->bitmap().fill(Color::White);
183173

184174
layer_table_view.set_model(image->layer_model());
185175
layer_table_view.on_selection_change = [&] {
@@ -191,6 +181,7 @@ int main(int argc, char** argv)
191181
};
192182

193183
image_editor.set_image(image);
184+
image_editor.set_active_layer(bg_layer);
194185

195186
return app.exec();
196187
}

0 commit comments

Comments
 (0)