In order to be consistent with the naming conventions for updated Tool Dialogs and Groups, I went ahead and updated the History Dialog as well. The Dialog now displays a vertical header with the row number, and the columns now contains the Tool Id, Name, and Description with tool icon. I also added a Copy to Clipboard toolbutton so you can copy items to the clipboard in CSV format to paste in an editor or spreadsheet. Clicking the header corner selects the whole table.
You may note that now you can easily see that a tool has been inserted into the history, such as ID 1239 at row number 5. Also lines will now be correctly named… such as Line_A15_A18 in row 18. In the future I may update the dialog further to extract more of a tool’s data such as lengths and angles. I also want to figure out a way to reset the current insertion point to point at the last row… as patterns get larger it takes more scrolling to get to the bottom.
Here I imported the clipboard into Libre Office…
This is very, very helpful, thank you
I have some very candid questions. .
Is the History Dialog a new feature or have I just entirely missed it ? I saw it, but thought it was some kind of recovery or backup option.
Does this mean I can export the whole drafting process without taking actual writen notes ?
Is this the tool you use to look at other users files when they have drafting problems on the forum ?
It’s been an existing feature… I’m just updating it to match the naming format of the (pending) updated tool dialogs. In the process I just decided to make it a bit more useful by providing the tool Id’s and an easy way to cut & paste the history items into a spreadsheet to print.
Sort of. Like I said I would like to expand on the data of each tool that the History would include. For example: To show the length and angle of a “Point Length and Angle” tool. Then you would more or less have the instructions to reproduce the pattern.
Sometimes. Usually though we open the pattern file in an editor and look through the xml based on an error message that may give the line and column number of the error.
That being said, one of the real uses of the History is to be able to go back in the time line and insert a missing point or line. In the attached screencap of one of Grace’s patterns (that I like to test with) shows that point A90 (id 1239) was inserted way back in the timeline. The blue arrow in the pic shows where the next tool will be inserted. So the idea is you can open the History, click on the 1st column on the row where you want the next tool to be added… the arrow is moved to that row. Then you draft your next tool and it’s inserted in the row after the arrow. Just remember to move the arrow back to the end of the History to continue normal drafting. Also be sure to backup BEFORE inserting into the History - it’s not fool proof.
You’re welcome. And again TY for the wonderful pattern to test with. It’s great to use as it make use of lots of different tools and groups… even the History trick. I just had to delete like 86 backup copies of it while testing the updated Props Editor issue, the History, and Groups. LOL
I realized as I was working on updating the groups that I needed to update the naming format of the tools in the History as well so that for ex the “Point - Length and Angle” tool text is consistent across the UI menus, dialogs, toolbars, toolbox, tooltips, Property Editor, Groups… and now History. All that’s left after that is renaming some of the tool tag names in the xml schema and the code.
Does this mean that the blue arrow now moves onto the new line created? So one no longer needs to remember to move it on once the new instruction has been completed?
Oh, that would be amazing
Hee-hee, you’re very welcome. I most certainly am guilty of making use of most tools of the program, including copy, paste, undo, redo and… one of my favourites… History.
Hmmm… This is particularly exciting - it may be much simplar to use this than to find the item in the Variables table, since you can click on an item in the History and it will be highlighted in the draft…Will this also give the lengths of the curves & arc’s?
No. Same as it was. Just changed the icon. I do want to figure out a way though to move the arrow to the bottom. Automatically after inserting may be an (easy) option, but if inserting multiple points it could be annoying to have to move the arrow again.
Well. We can grab any tool attributes based on the tool id.
For example… here’s a section of code for the old Point along Line tool - it’s now the Point On Line tool that creates the text string for a tool in the history table:
return tr("%3 - Point along line %1_%2")
where the 1st argument is the 1st point name, 2nd arg - 2nd point name, 3rd arg, the tool point name… and those get inserted into the translation string that get’s displayed inthe History table.
So for arcs we can easily access the XML dom Elements AttrCenter or AttrLength and / or the angle attributes. BUT, if we want to get the actual length of an arc, then it gets a bit more involved as we have to get the GObject of the arc from the tool id, and then from that call it’s getLength() to get it’s calculated length.
The History is just another way of viewing the pattern data, which is a combination of the XML dom document and the data container. The Variables Table is another view, which more or less is a static comprehensive display of all the calculated or constructed data.
Could I get a copy of TY’s test pattern to check import / export? Thanks.
TY’s test pattern is @Douglas thanking me for the pattern. I can’t remember which one it is, so if @Douglas can send it to you, please.
It’s the Basic Blouse.val