[TD]fix bitmap hatch
This commit is contained in:
committed by
WandererFan
parent
3a2fbc47e0
commit
8b60da803c
@@ -302,3 +302,20 @@ std::string Preferences::patFile()
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string Preferences::bitmapFill(void)
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Files");
|
||||
|
||||
std::string defaultDir = App::Application::getResourceDir() + "Mod/TechDraw/Patterns/";
|
||||
std::string defaultFileName = defaultDir + "default.png";
|
||||
std::string prefBitmapFile = hGrp->GetASCII("BitmapFill", defaultFileName.c_str());
|
||||
std::string result = prefBitmapFile;
|
||||
Base::FileInfo fi(result);
|
||||
if (!fi.isReadable()) {
|
||||
result = defaultFileName;
|
||||
Base::Console().Warning("Bitmap Fill File: %s is not readable\n", prefBitmapFile.c_str());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user