Fixed multiple segfaults

This commit is contained in:
Yousef Khadadeh 2026-03-30 18:51:14 +03:00
parent b4c35124c3
commit 2ad5684594
32 changed files with 1035 additions and 1010 deletions

View file

@ -21,15 +21,15 @@ void EraserTool::gui_toolbox() {
using namespace ElementHelpers;
Toolbar& t = drawP.world.main.toolbar;
t.gui.push_id("eraser tool");
text_label_centered(t.gui, "Eraser");
drawP.world.main.toolConfig.relative_width_gui(drawP, "Size");
text_label(t.gui, "Erase from:");
radio_button_selector(t.gui, "layer selector", &drawP.controls.layerSelector, {
{"Layer being edited", DrawingProgramLayerManager::LayerSelector::LAYER_BEING_EDITED},
{"All visible layers", DrawingProgramLayerManager::LayerSelector::ALL_VISIBLE_LAYERS}
t.gui.new_id("eraser tool", [&] {
text_label_centered(t.gui, "Eraser");
drawP.world.main.toolConfig.relative_width_gui(drawP, "Size");
text_label(t.gui, "Erase from:");
radio_button_selector(t.gui, "layer selector", &drawP.controls.layerSelector, {
{"Layer being edited", DrawingProgramLayerManager::LayerSelector::LAYER_BEING_EDITED},
{"All visible layers", DrawingProgramLayerManager::LayerSelector::ALL_VISIBLE_LAYERS}
});
});
t.gui.pop_id();
}
void EraserTool::right_click_popup_gui(Vector2f popupPos) {