Skip to content

Commit

Permalink
[TD]Apply filters to PropertyFile
Browse files Browse the repository at this point in the history
  • Loading branch information
WandererFan committed Sep 20, 2019
1 parent d4d9cd0 commit 0549366
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/Mod/TechDraw/App/DrawGeomHatch.cpp
Expand Up @@ -102,6 +102,9 @@ DrawGeomHatch::DrawGeomHatch(void)

getParameters();

std::string patFilter("pat files (*.pat *.PAT);;All files (*)");
FilePattern.setFilter(patFilter);

}

DrawGeomHatch::~DrawGeomHatch()
Expand Down
10 changes: 7 additions & 3 deletions src/Mod/TechDraw/App/DrawHatch.cpp
Expand Up @@ -75,9 +75,13 @@ DrawHatch::DrawHatch(void)
patternFileName = QString::fromStdString(defaultFileName);
}
QFileInfo tfi(patternFileName);
if (tfi.isReadable()) {
HatchPattern.setValue(patternFileName.toUtf8().constData());
}
if (tfi.isReadable()) {
HatchPattern.setValue(patternFileName.toUtf8().constData());
}

std::string svgFilter("Svg files (*.svg *.SVG);;All files (*)");
HatchPattern.setFilter(svgFilter);

}

DrawHatch::~DrawHatch()
Expand Down
3 changes: 3 additions & 0 deletions src/Mod/TechDraw/App/DrawSVGTemplate.cpp
Expand Up @@ -75,6 +75,9 @@ DrawSVGTemplate::DrawSVGTemplate()
Height.setStatus(App::Property::ReadOnly,true);
Width.setStatus(App::Property::ReadOnly,true);
Orientation.setStatus(App::Property::ReadOnly,true);

std::string svgFilter("Svg files (*.svg *.SVG);;All files (*)");
Template.setFilter(svgFilter);
}

DrawSVGTemplate::~DrawSVGTemplate()
Expand Down
3 changes: 3 additions & 0 deletions src/Mod/TechDraw/App/DrawViewImage.cpp
Expand Up @@ -56,6 +56,9 @@ DrawViewImage::DrawViewImage(void)
ADD_PROPERTY_TYPE(Width ,(100),vgroup,App::Prop_None,"The width of the image view");
ADD_PROPERTY_TYPE(Height ,(100),vgroup,App::Prop_None,"The height of the view");
ScaleType.setValue("Custom");

std::string imgFilter("Image files (*.jpg *.jpeg *.png);;All files (*)");
ImageFile.setFilter(imgFilter);
}

DrawViewImage::~DrawViewImage()
Expand Down
3 changes: 3 additions & 0 deletions src/Mod/TechDraw/App/DrawViewSection.cpp
Expand Up @@ -122,6 +122,9 @@ DrawViewSection::DrawViewSection()

getParameters();

std::string hatchFilter("Svg files (*.svg *.SVG);;PAT files (*.pat *.PAT);;All files (*)");
FileHatchPattern.setFilter(hatchFilter);

}

DrawViewSection::~DrawViewSection()
Expand Down

0 comments on commit 0549366

Please sign in to comment.