update 1st position of new component with UI master
authoryu.dongliang <18588496441@163.com>
Thu, 3 Jul 2025 08:52:48 +0000 (16:52 +0800)
committeryu.dongliang <18588496441@163.com>
Thu, 3 Jul 2025 08:52:48 +0000 (16:52 +0800)
ses_ui.c

index c2f1d090e11bca654d5262181028cda271478a7a..4855d52909cce250a8a1b1dde6423a80e731af99 100644 (file)
--- a/ses_ui.c
+++ b/ses_ui.c
@@ -446,7 +446,7 @@ static int button_2pins_clicked(ses_ui_t* ui, int type)
 
        EDA_INST_ADD_COMPONENT(ui->f, c, type);
        c->x = 200 + rand() % 100;
 
        EDA_INST_ADD_COMPONENT(ui->f, c, type);
        c->x = 200 + rand() % 100;
-       c->y = 200 + rand() % 100;
+       c->y = 100;
        c->w = 24;
        c->h = 24;
 
        c->w = 24;
        c->h = 24;
 
@@ -493,7 +493,7 @@ static int button_transistor_clicked(ses_ui_t* ui, int type)
 
        EDA_INST_ADD_COMPONENT(ui->f, c, type);
        c->x = 200 + rand() % 100;
 
        EDA_INST_ADD_COMPONENT(ui->f, c, type);
        c->x = 200 + rand() % 100;
-       c->y = 200 + rand() % 100;
+       c->y = 100;
        c->w = 24;
        c->h = 24;
 
        c->w = 24;
        c->h = 24;