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:
If called from SeamlyMe:
If called from any tool dialog or Property Editor:
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
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.
Where m_source is the flag argument sent to the edit dialog:
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.
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.
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.
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.