FX Edit Dialog

Hey folks… There was an issue that was on Github recently that indirectly led me to realize there’s a behavior in the FX Edit Dialog, while not a bug, is none the less an issue. That is, a user always has a choice to select from all the Tab options, when in fact they don’t always apply. For example if you edit a formula from the Variables Table you should not have access to any of the tool vaiables such as line length or line angle. Likewise in SeamlyMe you should only have access to Measurments and Formulas.

So in order to avoid any confusion - I fixed the FX Edit Dialog so it adapts to it’s parent or source dialog.

If called from Variables Table: Screenshot 2024-08-05 035352

If called from SeamlyMe: Screenshot 2024-08-05 035326

If called from any tool dialog or Property Editor: Screenshot 2024-08-05 035410

4 Likes

Oh, wow! Thank you very much, @Douglas. I think this will help new users a lot. :star_struck:

2 Likes

It certainly won’t hurt. :slight_smile:

And it’s really neat how I hide the tabs we don’t want to see. I simply pass a bit flag that represents which tabs are visible to the edit dialog… such as

ToolDialog      = 0000 0001 1111 1111  // show all
VariablesDialog = 0000 0001 0000 0011  // show meas, vars, and funcs
Measurements    = 0000 0001 0000 0001  // show meas and funcs

EditFormulaDialog(variable->GetData(), NULL_ID, VariableDialog, this)

and as I’m looping through the tabs in the initvariables routine doing some other stuff, with 1 line I simply check if the bit for the tab is set or not… if not hide the tab. No if or switch statements. :slight_smile:

Where m_source is the flag argument sent to the edit dialog:

ui->menuTab_ListWidget->item(i)->setHidden(!(m_source & (1 << i)));

3 Likes

Eeeek! I think you’re going to hate me, but… While you’re busy in this sections… Can you add the measurement code as an option in the Formulas?

image

2 Likes

Sure. That’s pretty simple to add another column and fill the data in. You’re only working in 2 dialog files with existing data. Maybe a few more if adding a Preference setting - although I’ve done the prefs so much I can add them in my sleep. :slight_smile:

What’s not as easy is to add a new piece of data to a variable, measurement, tool, or whatever. It means updating new schema, pattern / measurement conversion, multiple dialogs, multiple classes, reading / writing the pattern, etc.

2 Likes

Ok… If we add ‘Sleeve’ as the 1st word of the description and then the rest of the description, then we should be able to sort by description, in which case it will list everything starting with ‘Sleeve’ together with the description of the measurement also listed alphabetically/numberically.

I think this should help while a more permanent solution is implemented.

What do you think?

Not only that… one could filter by description as well.

Again… it’s not that difficult to add to the dialog - be the custom variables or measurements - as long as we’re just displaying more of existing data.

2 Likes

Ok, it sounds great all round.

I can think of a few ‘tags’:

  • Bodice
  • Bodice Front
  • Bodice Back
  • Sleeve
  • Trousers
  • Skirt
  • Horizontal
  • Vertical
  • Circumference
  • Ease

That’s all that I can think of for now. :crazy_face:

1 Like