unselect_all() before inserting wire label or text from the menu to avoid moving previously selected objects

This commit is contained in:
Stefan Frederik 2022-08-09 23:08:00 +02:00
parent ae0ffa926d
commit bd35e177f1
2 changed files with 2 additions and 1 deletions

View File

@ -822,7 +822,6 @@ int plot_raw_custom_data(int sweep_idx, int first, int last, const char *expr)
double get_raw_value(int dataset, int idx, int point)
{
int i, ofs;
Graph_ctx *gr = &xctx->graph_struct;
ofs = 0;
if(xctx->graph_values) {
if(dataset == -1) {

View File

@ -1712,6 +1712,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
if(!strcmp(argv[1],"net_label"))
{
cmd_found = 1;
unselect_all();
if(argc>=3) place_net_label(atoi(argv[2]));
}
@ -1870,6 +1871,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
xctx->semaphore++;
xctx->last_command = 0;
unselect_all();
xctx->mx_double_save = xctx->mousex_snap;
xctx->my_double_save = xctx->mousey_snap;
if(place_text(0, xctx->mousex_snap, xctx->mousey_snap)) { /* 1 = draw text 24122002 */