Forráskód Böngészése

fix: make background id optional so usages of -b, --bg do not require a fallback background (as expected) fixes #300

Almamu 1 éve
szülő
commit
555b488951

+ 4 - 1
src/WallpaperEngine/Application/CApplicationContext.cpp

@@ -26,8 +26,11 @@ CApplicationContext::CApplicationContext (int argc, char* argv []) :
 
         backgroundGroup.add_argument ("background id")
             .help ("The background to use as default for screens with no background specified")
+            .default_value ("")
             .action([this](const std::string& value) -> void {
-                this->settings.general.defaultBackground = translateBackground (value);
+                if (!value.empty()) {
+                    this->settings.general.defaultBackground = translateBackground (value);
+                }
             });
 
         backgroundMode.add_argument ("-w", "--window")