diff --git a/depthmapX/salaobj/metagraphdx.cpp b/depthmapX/salaobj/metagraphdx.cpp index 9108f47..b664b1e 100644 --- a/depthmapX/salaobj/metagraphdx.cpp +++ b/depthmapX/salaobj/metagraphdx.cpp @@ -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(-1) - ? std::nullopt - : std::make_optional(dd.displayedPointMap); - m_displayedDatamap = dd.displayedDataMap == static_cast(-1) - ? std::nullopt - : std::make_optional(dd.displayedDataMap); - m_displayedShapegraph = static_cast(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; } @@ -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(*m_displayedPointmap) - : static_cast(-1), - perPointMap, - m_displayedDatamap.has_value() ? static_cast(*m_displayedDatamap) - : static_cast(-1), - perDataMap, - m_displayedShapegraph.has_value() ? static_cast(*m_displayedShapegraph) - : static_cast(-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; diff --git a/modules/segmentshortestpaths/gui/segmentpathsmainwindow.cpp b/modules/segmentshortestpaths/gui/segmentpathsmainwindow.cpp index cae250d..aae2d2a 100644 --- a/modules/segmentshortestpaths/gui/segmentpathsmainwindow.cpp +++ b/modules/segmentshortestpaths/gui/segmentpathsmainwindow.cpp @@ -81,7 +81,7 @@ void SegmentPathsMainWindow::OnShortestPath(MainWindow *mainWindow, PathType pat graphDoc->m_communicator->setAnalysis(std::unique_ptr( 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: { diff --git a/salalib b/salalib index 71c3162..fc6f1a4 160000 --- a/salalib +++ b/salalib @@ -1 +1 @@ -Subproject commit 71c3162b17a44a232c9982c21c76af313eb62205 +Subproject commit fc6f1a499d27d6235a83e1c0d1a20345a5ae76af