filename as Optional argument
This commit is contained in:
parent
9736dc3115
commit
b44371f4bf
3 changed files with 10 additions and 5 deletions
|
@ -729,8 +729,11 @@ void Window::SetAspectRatio(double aspect_ratio, mate::Arguments* args) {
|
|||
window_->SetAspectRatio(aspect_ratio, extra_size);
|
||||
}
|
||||
|
||||
void Window::PreviewFile(const std::string& filepath,
|
||||
const std::string& filename) {
|
||||
void Window::PreviewFile(const std::string& filepath, mate::Arguments* args) {
|
||||
std::string filename;
|
||||
if (!args->GetNext(&filename)) {
|
||||
filename = filepath;
|
||||
}
|
||||
window_->PreviewFile(filepath, filename);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue