From: robertl Date: Sun, 31 Oct 2010 19:31:26 +0000 (+0000) Subject: In the GUI, ensure that all binary options appear on the command. This is especially... X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~11^2~910 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=018ff591b796e161308242986f8d42e3ed0f7d38;p=gpsbabel.git In the GUI, ensure that all binary options appear on the command. This is especially useful in KML where we have many options that default to true and previously had no way to turn them off. --- diff --git a/gpsbabel/gui/mainwindow.cpp b/gpsbabel/gui/mainwindow.cpp index 26a03152f..d28d87952 100644 --- a/gpsbabel/gui/mainwindow.cpp +++ b/gpsbabel/gui/mainwindow.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -// $Id: mainwindow.cpp,v 1.25 2010-09-02 03:10:46 robertl Exp $ +// $Id: mainwindow.cpp,v 1.26 2010-10-31 19:31:26 robertl Exp $ //------------------------------------------------------------------------ // // Copyright (C) 2009 S. Khai Mong . @@ -111,8 +111,14 @@ static QString MakeOptions(const QList& options) if (options[i].getSelected()) { str += ","; str += options[i].getName(); - if (options[i].getType() != FormatOption::OPTbool) { - str += "=" + options[i].getValue().toString(); + if (options[i].getType() == FormatOption::OPTbool) { + str += "=1"; + } else { + str += "=" + options[i].getValue().toString(); + } + } else { + if (options[i].getType() == FormatOption::OPTbool) { + str += "," + options[i].getName() + "=0"; } } }