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

@ -20,10 +20,10 @@ DrawingProgramToolType RectSelectTool::get_type() {
void RectSelectTool::gui_toolbox() {
auto& t = drawP.world.main.toolbar;
t.gui.push_id("rectangle select tool");
GUIStuff::ElementHelpers::text_label_centered(t.gui, "Rectangle Select");
drawP.selection.selection_gui();
t.gui.pop_id();
t.gui.new_id("rectangle select tool", [&] {
GUIStuff::ElementHelpers::text_label_centered(t.gui, "Rectangle Select");
drawP.selection.selection_gui();
});
}
void RectSelectTool::input_key_callback(const InputManager::KeyCallbackArgs& key) {