Skip to content

Commit

Permalink
Update to latest sala
Browse files Browse the repository at this point in the history
  • Loading branch information
pklampros committed Jul 13, 2024
1 parent 6e2c3ac commit 0a962b6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 21 deletions.
24 changes: 5 additions & 19 deletions depthmapX/salaobj/metagraphdx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2238,15 +2238,9 @@ MetaGraphReadWrite::ReadStatus MetaGraphDX::readFromStream(std::istream &stream,
m_viewClass = dd.viewClass;
m_showGrid = dd.showGrid;
m_showText = dd.showText;
m_displayedPointmap = dd.displayedPointMap == static_cast<unsigned int>(-1)
? std::nullopt
: std::make_optional(dd.displayedPointMap);
m_displayedDatamap = dd.displayedDataMap == static_cast<unsigned int>(-1)
? std::nullopt
: std::make_optional(dd.displayedDataMap);
m_displayedShapegraph = static_cast<int>(dd.displayedShapeGraph) < 0
? std::nullopt
: std::make_optional(dd.displayedShapeGraph);
m_displayedPointmap = dd.displayedPointMap;
m_displayedDatamap = dd.displayedDataMap;
m_displayedShapegraph = dd.displayedShapeGraph;
} catch (MetaGraphReadWrite::MetaGraphReadError &e) {
std::cerr << "MetaGraph reading failed: " << e.what() << std::endl;
}
Expand Down Expand Up @@ -2323,16 +2317,8 @@ MetaGraphReadWrite::ReadStatus MetaGraphDX::write(const std::string &filename, i
version, m_metaGraph.name, m_metaGraph.region, m_metaGraph.fileProperties, drawingFiles,
pointMaps, dataMaps, shapeGraphs, m_allLineMapData,
// display data
tempState, tempViewClass, m_showGrid, m_showText, perDrawingMap,
m_displayedPointmap.has_value() ? static_cast<unsigned int>(*m_displayedPointmap)
: static_cast<unsigned int>(-1),
perPointMap,
m_displayedDatamap.has_value() ? static_cast<unsigned int>(*m_displayedDatamap)
: static_cast<unsigned int>(-1),
perDataMap,
m_displayedShapegraph.has_value() ? static_cast<unsigned int>(*m_displayedShapegraph)
: static_cast<unsigned int>(-1),
perShapeGraph);
tempState, tempViewClass, m_showGrid, m_showText, perDrawingMap, m_displayedPointmap,
perPointMap, m_displayedDatamap, perDataMap, m_displayedShapegraph, perShapeGraph);

m_state = oldstate;
return MetaGraphReadWrite::ReadStatus::OK;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void SegmentPathsMainWindow::OnShortestPath(MainWindow *mainWindow, PathType pat
graphDoc->m_communicator->setAnalysis(std::unique_ptr<IAnalysis>(
new SegmentMetricShortestPath(map.getInternalMap(), refFrom, refTo)));
map.overrideDisplayedAttribute(-2);
map.setDisplayedAttribute(SegmentMetricShortestPath::Column::METRIC_SHORTEST_PATH_DEPTH);
map.setDisplayedAttribute(SegmentMetricShortestPath::Column::METRIC_SHORTEST_PATH_DISTANCE);
break;
}
case PathType::TOPOLOGICAL: {
Expand Down
2 changes: 1 addition & 1 deletion salalib

0 comments on commit 0a962b6

Please sign in to comment.