File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,13 @@ void PainterImageDialog::done(const int r)
115115
116116 std::optional<std::string> path_string;
117117
118- if (path_type_ == PainterImagePathType::DIRECTORY)
118+ switch (path_type_)
119+ {
120+ case PainterImagePathType::NONE:
121+ {
122+ break ;
123+ }
124+ case PainterImagePathType::DIRECTORY:
119125 {
120126 path_string = ui_.line_edit_path ->text ().toStdString ();
121127 const std::filesystem::path path = path_from_utf8 (*path_string);
@@ -125,8 +131,9 @@ void PainterImageDialog::done(const int r)
125131 dialogs::message_critical (msg);
126132 return ;
127133 }
134+ break ;
128135 }
129- else if (path_type_ == PainterImagePathType::FILE)
136+ case PainterImagePathType::FILE:
130137 {
131138 path_string = ui_.line_edit_path ->text ().toStdString ();
132139 const std::filesystem::path path = path_from_utf8 (*path_string);
@@ -136,6 +143,8 @@ void PainterImageDialog::done(const int r)
136143 dialogs::message_critical (msg);
137144 return ;
138145 }
146+ break ;
147+ }
139148 }
140149
141150 parameters_.emplace ();
You can’t perform that action at this time.
0 commit comments