force a crosshair draw at end of draw() (draw_crosshair(7,...)), intuitive interface direct drag of instances: fix some non-working combinations when stretch mode (y) is enabled.

This commit is contained in:
stefan schippers 2025-01-27 01:49:06 +01:00
parent bfd7895d4c
commit 0d325f6957
4 changed files with 6324 additions and 6322 deletions

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 2.4 MiB

After

Width:  |  Height:  |  Size: 2.4 MiB

View File

@ -4239,17 +4239,17 @@ int rstate; /* (reduced state, without ShiftMask) */
int stretch = (state & ControlMask ? 1 : 0) ^ enable_stretch;
xctx->drag_elements = 1;
/* select attached nets depending on ControlMask and enable_stretch */
if(stretch && !(state & ShiftMask)) {
if(stretch) {
select_attached_nets(); /* stretch nets that land on selected instance pins */
}
/* if dragging instances with Ctrl and Shift down add wires to pins attached to something */
if(state == (ShiftMask | ControlMask) ) {
/* if dragging instances with stretch enabled and Shift down add wires to pins
* attached to something */
if((state & ShiftMask) && stretch) {
xctx->connect_by_kissing = 2; /* 2 will be used to reset var to 0 at end of move */
move_objects(START,0,0,0);
}
/* dragging away an object with Shift pressed is a copy (duplicate object) */
else if(state == ShiftMask) copy_objects(START);
else if(state & ShiftMask) copy_objects(START);
/* else it is a move */
else move_objects(START,0,0,0);
}

View File

@ -5137,7 +5137,7 @@ void draw(void)
} else {
draw_selection(xctx->gc[SELLAYER], 0); /* 20181009 moved outside of cadlayers loop */
}
if(tclgetboolvar("draw_crosshair")) draw_crosshair(3, 0); /* what = 1(clear) + 2(draw) */
if(tclgetboolvar("draw_crosshair")) draw_crosshair(7, 0); /* what = 1(clear) + 2(draw) */
} /* if(has_x) */
}

View File

@ -5682,6 +5682,10 @@ P 1 5 1707.5 -145 1712.5 -145 1712.5 -120 1707.5 -120 1707.5 -145 {}
P 1 14 2260 -200 2282.5 -200 2287.5 -200 2287.5 -195 2287.5 -152.5 2280 -127.5 2275 -127.5 2245 -127.5 2240 -127.5 2232.5 -152.5 2232.5 -195 2232.5 -200 2237.5 -200 2260 -200 {bezier=1}
P 1 14 2275 -197.5 2280 -197.5 2285 -197.5 2285 -192.5 2285 -172.5 2285 -167.5 2280 -167.5 2270 -167.5 2265 -167.5 2265 -172.5 2265 -192.5 2265 -197.5 2270 -197.5 2275 -197.5 {bezier=1}
P 1 5 2257.5 -195 2262.5 -195 2262.5 -170 2257.5 -170 2257.5 -195 {}
P 1 10 1710 -6255 1735 -6255 1745 -6245 1745 -6215 1735 -6205 1685 -6205 1675 -6215 1675 -6245 1685 -6255 1710 -6255 {bezier=1}
P 1 10 1710 -6260 1740 -6260 1750 -6250 1750 -6210 1740 -6200 1680 -6200 1670 -6210 1670 -6250 1680 -6260 1710 -6260 {bezier=1}
P 1 10 2560 -6435 2585 -6435 2595 -6425 2595 -6395 2585 -6385 2535 -6385 2525 -6395 2525 -6425 2535 -6435 2560 -6435 {bezier=1}
P 1 10 2560 -6440 2590 -6440 2600 -6430 2600 -6390 2590 -6380 2530 -6380 2520 -6390 2520 -6430 2530 -6440 2560 -6440 {bezier=1}
P 2 7 897.5 -6830 893.75 -6835 885 -6835 888.75 -6830 885 -6825 893.75 -6825 897.5 -6830 {fill=true}
P 2 7 1457.5 -6830 1453.75 -6835 1445 -6835 1448.75 -6830 1445 -6825 1453.75 -6825 1457.5 -6830 {fill=true}
P 2 7 2277.5 -6830 2273.75 -6835 2265 -6835 2268.75 -6830 2265 -6825 2273.75 -6825 2277.5 -6830 {fill=true}
@ -5930,7 +5934,7 @@ P 7 14 1695 -147.5 1700 -147.5 1705 -147.5 1705 -142.5 1705 -122.5 1705 -117.5 1
bezier=1}
P 7 14 2245 -197.5 2250 -197.5 2255 -197.5 2255 -192.5 2255 -172.5 2255 -167.5 2250 -167.5 2240 -167.5 2235 -167.5 2235 -172.5 2235 -192.5 2235 -197.5 2240 -197.5 2245 -197.5 {fill=1
bezier=1}
P 9 8 1770 -10100 1912.5 -10072.5 1890 -10040 1980 -9980 1960 -9950 1870 -10010 1845 -9975 1770 -10100 {fill=0}
P 9 8 1800 -10090 1942.5 -10062.5 1920 -10030 2010 -9970 1990 -9940 1900 -10000 1875 -9965 1800 -10090 {fill=0}
P 10 7 880 -11520 872.5 -11527.5 877.5 -11532.5 862.5 -11537.5 867.5 -11522.5 872.5 -11527.5 880 -11520 {fill=1}
P 10 7 2110 -11570 2102.5 -11577.5 2107.5 -11582.5 2092.5 -11587.5 2097.5 -11572.5 2102.5 -11577.5 2110 -11570 {fill=1}
P 10 7 1330 -11560 1322.5 -11567.5 1327.5 -11572.5 1312.5 -11577.5 1317.5 -11562.5 1322.5 -11567.5 1330 -11560 {fill=1}
@ -5976,7 +5980,7 @@ P 10 7 2460 -5560 2452.5 -5567.5 2457.5 -5572.5 2442.5 -5577.5 2447.5 -5562.5 24
P 10 7 2560 -5310 2552.5 -5317.5 2557.5 -5322.5 2542.5 -5327.5 2547.5 -5312.5 2552.5 -5317.5 2560 -5310 {fill=1}
P 10 7 2030 -5210 2022.5 -5217.5 2027.5 -5222.5 2012.5 -5227.5 2017.5 -5212.5 2022.5 -5217.5 2030 -5210 {fill=1}
P 10 7 1520 -5200 1512.5 -5207.5 1517.5 -5212.5 1502.5 -5217.5 1507.5 -5202.5 1512.5 -5207.5 1520 -5200 {fill=1}
P 10 8 1770 -10100 1912.5 -10072.5 1890 -10040 1980 -9980 1960 -9950 1870 -10010 1845 -9975 1770 -10100 {fill=1}
P 10 8 1800 -10090 1942.5 -10062.5 1920 -10030 2010 -9970 1990 -9940 1900 -10000 1875 -9965 1800 -10090 {fill=1}
P 10 7 2470 -3880 2462.5 -3887.5 2467.5 -3892.5 2452.5 -3897.5 2457.5 -3882.5 2462.5 -3887.5 2470 -3880 {fill=1}
P 10 7 2450 -2490 2442.5 -2497.5 2447.5 -2502.5 2432.5 -2507.5 2437.5 -2492.5 2442.5 -2497.5 2450 -2490 {fill=1}
P 10 7 380 -9640 372.5 -9647.5 377.5 -9652.5 362.5 -9657.5 367.5 -9642.5 372.5 -9647.5 380 -9640 {fill=1}
@ -6084,9 +6088,8 @@ T {Stretch multiple
shapes} 0 -5290 0 0 1 1 {}
T {Ctrl} 1430 -6065 0 0 0.5 0.5 {hcenter=1}
T {Shift} 1430 -5985 0 0 0.5 0.5 {hcenter=1}
T {Accurately position closer
to the wire end to be moved
so it will not be unselected} 1610 -10260 0 0 0.5 0.5 {}
T {Accurately position close
to the wire end to be moved} 1600 -10230 0 0 0.5 0.5 {}
T {Move multiple
objects keeping
connections} 0 -3270 0 0 1 1 {}
@ -6366,3 +6369,5 @@ beziers} 0 -240 0 0 1 1 {}
T {q} 1143.75 -248.75 0 0 0.5 0.5 {hcenter=1}
T {Add attribute:} 1048.75 -173.75 0 0 0.5 0.5 {}
T {bezier=1} 1050 -131.25 0 0 0.7 0.7 {font=monospace layer=4}
T {h} 1710 -6245 0 0 0.5 0.5 {hcenter=1}
T {v} 2560 -6425 0 0 0.5 0.5 {hcenter=1}