[TD]apply review comments
This commit is contained in:
@@ -44,8 +44,6 @@
|
||||
#include <Base/Vector3D.h>
|
||||
#include <Base/VectorPy.h>
|
||||
|
||||
#include <Gui/Application.h>
|
||||
|
||||
#include <Mod/Import/App/dxf/ImpExpDxf.h>
|
||||
#include <Mod/Part/App/OCCError.h>
|
||||
#include <Mod/Part/App/TopoShape.h>
|
||||
@@ -74,7 +72,6 @@
|
||||
#include "GeometryObject.h"
|
||||
#include "ProjectionAlgos.h"
|
||||
#include "TechDrawExport.h"
|
||||
#include "CosmeticVertexPy.h"
|
||||
#include "DrawLeaderLinePy.h"
|
||||
|
||||
namespace TechDraw {
|
||||
|
||||
@@ -1890,9 +1890,8 @@ std::string DrawUtil::cleanFilespecBackslash(const std::string& filespec)
|
||||
//! returns true if the Gui module and its event loop are active.
|
||||
bool DrawUtil::isGuiUp()
|
||||
{
|
||||
std::string pyCommand{"import FreeCAD\nguiState = FreeCAD.GuiUp"};
|
||||
std::string result{Base::Interpreter().runStringWithKey(pyCommand.c_str(), "guiState", "None")};
|
||||
return (result == "1");
|
||||
auto* app = QCoreApplication::instance();
|
||||
return (app != nullptr) && app->inherits("QApplication");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user