diff options
| author | Patrick Storz <eduard.braun2@gmx.de> | 2019-09-08 16:45:44 +0000 |
|---|---|---|
| committer | Patrick Storz <eduard.braun2@gmx.de> | 2019-09-08 16:45:44 +0000 |
| commit | ad87f72cfdc30dc6e94c3fdb7e72ff67ce7552aa (patch) | |
| tree | b6b3c1af251dd5d1d35cd12621a160e0f349f416 /src/inkview-window.cpp | |
| parent | Inkview: show file chooser dialog if called without arguments (diff) | |
| download | inkscape-ad87f72cfdc30dc6e94c3fdb7e72ff67ce7552aa.tar.gz inkscape-ad87f72cfdc30dc6e94c3fdb7e72ff67ce7552aa.zip | |
Inkview: show error message if there are no valid files and exit
Diffstat (limited to '')
| -rw-r--r-- | src/inkview-window.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/inkview-window.cpp b/src/inkview-window.cpp index 05893dc9b..57e7f4727 100644 --- a/src/inkview-window.cpp +++ b/src/inkview-window.cpp @@ -49,6 +49,10 @@ InkviewWindow::InkviewWindow(const Gio::Application::type_vec_files files, preload_documents(); } + if (_files.empty()) { + throw NoValidFilesException(); + } + _documents.resize( _files.size(), nullptr); // We keep _documents and _files in sync. // Callbacks @@ -278,7 +282,7 @@ InkviewWindow::show_control() return; } - + builder->get_widget("ControlWindow", _controlwindow); if (!_controlwindow) { std::cerr << "InkviewWindow::show_control: Control Window not found!" << std::endl; |
