diff --git a/aegisub/src/base_grid.h b/aegisub/src/base_grid.h index c812901ed..3f7256d7c 100644 --- a/aegisub/src/base_grid.h +++ b/aegisub/src/base_grid.h @@ -143,7 +143,8 @@ public: virtual void SetActiveLine(AssDialogue *new_line); virtual AssDialogue * GetActiveLine() const { return active_line; } virtual void SetSelectedSet(const Selection &new_selection); - virtual void GetSelectedSet(Selection &res) const { res.insert(selection.begin(), selection.end()); } + virtual void GetSelectedSet(Selection &res) const { res = selection; } + virtual Selection GetSelectedSet() const { return selection; } virtual void NextLine(); virtual void PrevLine(); diff --git a/aegisub/src/selection_controller.h b/aegisub/src/selection_controller.h index a3f36f835..d064a2f44 100644 --- a/aegisub/src/selection_controller.h +++ b/aegisub/src/selection_controller.h @@ -131,6 +131,10 @@ public: /// @param[out] selection Filled with the selected set on return virtual void GetSelectedSet(Selection &selection) const = 0; + /// @brief Obtain the selected set + /// @return The selected set + virtual Selection GetSelectedSet() const = 0; + /// @brief Change the active line to the next in sequence /// /// If there is no logical next line in sequence, no change happens. This should