Link:
https://github.com/FreeCAD/FreeCAD/blob ... d.cpp#L290
It seems to me that this method should print a translated comment to the console describing what the command will do. But this method does not do this.
What Gui::Command::openCommand do and for what it argument is translated?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
What Gui::Command::openCommand do and for what it argument is translated?
Last edited by Evgeniy on Sat Sep 25, 2021 2:12 pm, edited 1 time in total.
Re: What Gui::Command::openCommand do?
IIRC, openCommand creates a new transaction (eventually closing the active one) in the undo/redo stack, and it uses the string as a name for the transaction.
Why do you think it should print something?
Why do you think it should print something?
Re: What Gui::Command::openCommand do?
Because this line is followed by lines that print the text of the python script into python console.
Then I don't understand why it should be translated that,if it is not used anywhere?
Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Left-align cell"));
Last edited by Evgeniy on Sat Sep 25, 2021 4:03 pm, edited 1 time in total.
Re: What Gui::Command::openCommand do?
Better ask than guess. The strings are visible in the undo stack that you can expand close to the Undo button.
Re: What Gui::Command::openCommand do?
But you guessed it was there for nothing.Evgeniy wrote: ↑Sat Sep 25, 2021 4:07 pm And I asked... https://forum.freecadweb.org/viewtopic. ... 06#p535806
Anyway, you're welcome (I guess next step is that I have to apologize for helping )