Skip to content

Commit

Permalink
show edges only
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomei committed May 17, 2024
1 parent 7b57760 commit d60ac61
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions bin/CRITERIAGEO/dialogSelectField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ DialogSelectField::DialogSelectField(Crit3DShapeHandler* shapeHandler, QString f
if (dialogType == RASTERIZE || dialogType == RASTERIZE_WITHBASE)
fields << "Shape ID";

if (dialogType == SHAPESTYLE)
fields << "Edges only";

for (int i = 0; i < shapeHandler->getFieldNumbers(); i++)
{
typeField = shapeHandler->getFieldType(i);
Expand Down
9 changes: 8 additions & 1 deletion bin/CRITERIAGEO/mainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,12 @@ void MainWindow::removeShape(GisObject* myObject)
void MainWindow::setShapeStyle(GisObject* myObject, std::string fieldName)
{
MapGraphicsShapeObject* shapeObject = getShapeObject(myObject);
if (fieldName == "Edges only")
{
shapeObject->setFill(false);
return;
}

DBFFieldType fieldType = myObject->getShapeHandler()->getFieldType(fieldName);

if (fieldType == FTString)
Expand All @@ -626,7 +632,8 @@ void MainWindow::setShapeStyle(GisObject* myObject, std::string fieldName)

void MainWindow::setShapeStyle_GUI(GisObject* myObject)
{
DialogSelectField shapeFieldDialog(myObject->getShapeHandler(), myObject->fileName, false, SHAPESTYLE);
bool isOnlyNumeric = false;
DialogSelectField shapeFieldDialog(myObject->getShapeHandler(), myObject->fileName, isOnlyNumeric, SHAPESTYLE);
if (shapeFieldDialog.result() == QDialog::Accepted)
{
std::string fieldName = shapeFieldDialog.getFieldSelected().toStdString();
Expand Down

0 comments on commit d60ac61

Please sign in to comment.