Skip to content

Commit

Permalink
Fem: in FEM_PostFilterLinearizedStresses command do not use a hard-co…
Browse files Browse the repository at this point in the history
…ded object name but that of the selected FemPostDataAlongLineFilter
  • Loading branch information
wwmayer committed Jun 13, 2022
1 parent 915371a commit 7400b11
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Mod/Fem/Gui/Command.cpp
Expand Up @@ -33,10 +33,11 @@
#endif

#include <App/Document.h>
#include <App/DocumentObserver.h>
#include <Gui/Action.h>
#include <Gui/Application.h>
#include <Gui/BitmapFactory.h>
#include <Gui/Command.h>
#include <Gui/CommandT.h>
#include <Gui/Document.h>
#include <Gui/FileDialog.h>
#include <Gui/MainWindow.h>
Expand Down Expand Up @@ -1491,9 +1492,11 @@ void CmdFemPostLinearizedStressesFilter::activated(int)
) {
// TODO FIXME only works if the data along the line object has the name DataAlongLine
// we should get the selected data along the line object
doCommand(Gui::Command::Doc, "t_coords = App.ActiveDocument.DataAlongLine.XAxisData");
doCommand(Gui::Command::Doc, "sValues = App.ActiveDocument.DataAlongLine.YAxisData");
doCommand(Gui::Command::Doc, Plot().c_str());
App::DocumentObjectT objT(DataAlongLine);
std::string ObjName = objT.getObjectPython();
Gui::doCommandT(Gui::Command::Doc, "t_coords = %s.XAxisData", ObjName);
Gui::doCommandT(Gui::Command::Doc, "sValues = %s.YAxisData", ObjName);
Gui::doCommandT(Gui::Command::Doc, Plot().c_str());
}
else {
QMessageBox::warning(Gui::getMainWindow(),
Expand Down

0 comments on commit 7400b11

Please sign in to comment.