How to make sub-parts with a common pin?

Well done @vanepp, that looks pretty comprehensive. I’m guessing the missing rats-nest I mentioned is associated to the bugs you have reported?
Sorry I keep finding bugs!

One other question about subparts in general; How do I get a label to appear in the same way as a part without subparts? I notice that parts with subparts don’t have labels.

The resistors in the example above need to have a label. I need a copy of the label for each subpart that follows it around wherever I put it. If I group resistors together then I would want to turn off duplicate labels. Logic gates don’t need a label, so I need a way of enabling or disabling labelling altogether depending upon the part.

Is this easy/possible?

Maybe or it may be yet another bug, I guess we will see. Hopefully with examples of what is wrong a better fix will be forthcoming.

no need to be sorry for finding bugs. Getting a reproducible bug report is key to fixing the bugs. The most work is usually trying to reproduce the bug so you can be sure you fixed it. I have been trying for 4 or 5 year to reproduce a bug that corrupts the routing database by making changes in multiple views so far without being able to reproduce it so it can be fixed.

Yes, there is per element labeling now, it just defaults to off. Right click on the element you want to label and click Show label (or Hide label to remove it.)

turning it on labels the selected subpart

and the label moves with the subpart.

Peter

Ah, that’s where it is! Perfect! I was searching in the fzp to enable the label. :blush:

Is the “part label” the only editable label? How do you make other labels editable, such as “chip label”, etc? It would be great if I could enable the drop down menu for “resistance”, like what’s available on the core part resistor.

Some can be done by properties (to select between versions) but the resistor values use special code and need your resistor to be part of the family resistor (which expects a single resistor and will try and change the color band values and thus probably won’t work here.) It would be nice to have an api that would let you do things like this, but it isn’t present in the current code.

Peter

So, for a non-core part, the only property you can edit or type text in is the “part label”?
Can you make up your own property that’s editable?

Not that I know of. The code knows to show a pull down box for the different variants of a part, but nothing else as far as I know. What I would like is a code mode to make an editable property available, with the values in a property or other field of the part so you can define both the property and the values it can have (with an option for user set values if you want) so you can do this with any part, but it isn’t in the code as far as I know (and may well have issues I haven’t though of as well!)

Peter

Yes, that would be ideal and what I was hoping for. One for the wish list if the developers run out of bugs to fix!

An annoying bug that I can’t pin down, is the right-click-label-move bug. It doesn’t happen every time, so I’ve not mentioned it before. If you load some parts in Schematic and move the position of a few labels, when you right click on a label to edit it’s properties, the label jumps away from the part by a certain distance.

It may be related to this open issue on github, or be a new one. If you can find a way to reproduce it reliably open a bug on github. The problem with the intermittent bugs is reproducing them so you can verify your fix worked.

Peter

I don’t think it’s connected because it’s to do with the part label and nothing within the svg files. It happens 7 out of 10 times, I just can’t get it to do it every time.

Which fritzing version? On 0.9.9 on win10 I have right clicked on the label value and changed most of the fields about 10 times and it always stays in the same place.

Peter

I’m on 0.9.9 with Windows 7.
That’s strange, it’s always done it, even with older versions. I forgot to mention that the part has to be selected first, before right clicking. You don’t need to change anything, it jumps as soon as the mouse button is clicked.

That is odd! I am selecting the part (you can’t change the label value without doing that) but for me it doesn’t move. Perhaps something different about Win 7, although that seems odd as well because QT is cross platform (but Win7 probably isn’t directly supported or tested against any more.) On this one I changed all the label fields to being displayed one at a time and changed the font size and R1 didn’t move in any of the changes.

Peter

Another thing I forgot to mention; it has to be a different part to the last one selected. If you select and un-select the same part, it never moves.

This is how I get it to bug out;

Load two parts and select one…
right-click-label-move-bug3
click nowhere to deselect, then click to select the other part, right click the label…
right-click-label-move-bug4
click nowhere to deselect, then click to select the other part, right click the label…
right-click-label-move-bug5
repeat until label moves (after three attempts for me).
right-click-label-move-bug6
The label properties don’t appear when the label moves.

Still doesn’t happen for me on Win10. Once I managed to delete all the labels on R1 (it usually inserts a ? when I delete the label) but I haven’t been able to do that again (I had to delete the resistor to get the label back!)

Peter

I’ve sussed it. Like most puzzles, if you lay in bed thinking about it, the idea comes! So, I woke up this morning and plugged in my spare mouse (this one was wired) and the bug disappeared.

One new discovery I made was that you can drag the label with the right mouse button (as well as the left) and also if you try to do this, the label jumps to twice the distance away from the part (just like the bug).

If you can replicate this, then I think the problem I was having was that my wireless mouse was sending a right-click and a slight movement signal at the same time.

Yes this one I can duplicate. I started here

now right clicking on the label and moving it one grid line right causes a large jump in label position (which appears to be a bug!)

here I only moved the mouse one grid line but the label jumped a large distance but only if you right click and move the label (left click appears to work correctly!) I’ll report it as a bug.

Peter

Great, another one nailed down. It’s been bugging me for ages that one. I don’t see why you would want to drag it with the right button anyway, it’s not intuitive.

I’ve made a report on here. Can you report it on Github as I don’t have an account on there?

Thanks

While it isn’t intuitive, the current behavior also isn’t correct so it should be fixed (at a low priority probably.)

Yep reported on github

Peter

I fixed the label bug in my computer. I will submit a pull request soon.
Easy bug to fix (once you find a way to reproduce it) :slight_smile: