[TD]add preference for progress reporting

This commit is contained in:
Wanderer Fan
2022-07-29 12:48:35 -04:00
committed by WandererFan
parent f12846599d
commit b1dd0bd2d0
5 changed files with 35 additions and 5 deletions

View File

@@ -582,8 +582,10 @@ void DrawView::requestPaint()
}
void DrawView::showProgressMessage(std::string featureName, std::string text)
{
signalProgressMessage(this, featureName, text);
{
if (Preferences::reportProgress()) {
signalProgressMessage(this, featureName, text);
}
}
PyObject *DrawView::getPyObject(void)

View File

@@ -339,3 +339,12 @@ double Preferences::GapASME()
double factor = hGrp->GetFloat("GapASME", 6.0);
return factor;
}
bool Preferences::reportProgress()
{
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter().
GetGroup("BaseApp")->GetGroup("Preferences")->
GetGroup("Mod/TechDraw/General");
bool report = hGrp->GetBool("ReportProgress", false);
return report;
}

View File

@@ -81,6 +81,7 @@ static std::string bitmapFill();
static double GapISO();
static double GapASME();
static bool reportProgress();
};
} //end namespace TechDraw