Update nodes upon setnode command
authorLukáš Jiřiště <gymnazium.jiriste@gmail.com>
Sun, 23 Feb 2025 20:05:19 +0000 (21:05 +0100)
committerLukáš Jiřiště <gymnazium.jiriste@gmail.com>
Sun, 23 Feb 2025 20:05:19 +0000 (21:05 +0100)
src/main.c

index 8ec633132946b98c86ef53495d33ed3b1978c581..7ed93d638658d72fe9e86c82ce9973596015dc09 100644 (file)
@@ -236,7 +236,11 @@ int        process_input(t_windows *windows, t_vec *nodes, t_vec *mosfets)
        else if (input.command == draw)
                res = c_draw(windows->command_win, input, nodes, mosfets);
        else if (input.command == setnode)
+       {
                res = c_setnode(windows->command_win, input, nodes);
+               update_nodes(nodes, mosfets);
+               refresh_schema_win(windows->schematics_win, nodes, mosfets);
+       }
        else if (input.command == addnode)
                res = c_addnode(windows->command_win, input, nodes);
        else if (input.command == addfet)