diff --git a/apps/opencs/view/render/pagedworldspacewidget.cpp b/apps/opencs/view/render/pagedworldspacewidget.cpp index ab02d63eef..0f23dfe7b7 100644 --- a/apps/opencs/view/render/pagedworldspacewidget.cpp +++ b/apps/opencs/view/render/pagedworldspacewidget.cpp @@ -15,19 +15,26 @@ void CSVRender::PagedWorldspaceWidget::useViewHint (const std::string& hint) if (hint[0]=='c') { - char ignore1, ignore2, ignore3; - int x, y; + // syntax: c:#x1 y1; #x2 y2 (number of coordinate pairs can be 0 or larger) + char ignore; std::istringstream stream (hint.c_str()); - if (stream >> ignore1 >> ignore2 >> ignore3 >> x >> y) + if (stream >> ignore) { - selection.add (CSMWorld::CellCoordinates (x, y)); + char ignore1; // : or ; + char ignore2; // # + int x, y; + + while (stream >> ignore1 >> ignore2 >> x >> y) + selection.add (CSMWorld::CellCoordinates (x, y)); /// \todo adjust camera position } } - - /// \todo implement 'r' type hints + else if (hint[0]=='r') + { + /// \todo implement 'r' type hints + } setCellSelection (selection); }