> On May 22, 2015, 7:17 p.m., Constantin Mihalache wrote: > > src/lib/marble/geodata/writers/kml/KmlLabelStyleTagWriter.cpp, line 39 > > <https://git.reviewboard.kde.org/r/123866/diff/2/?file=370442#file370442line39> > > > > Handling color defaults in KmlColorStyleTagWriter may not be working > > right because each style tag can have a different default. > > > > Even if isEmpty() is never called for any LabelStyleTag, they are all > > written to .kml. > > > > As I see things, this can be solved, either by checking in > > KmlColorStyleTagWriter for each "nodeType" defaults, or by handling color > > in each StyleTagWriter. > > > > Could you please advise further implementation ? > > > > **Unit Test ** > > ListStyleTest1.kml (FAIL) <- the file doesn't have any <LabelStyle> > > tags, but <LabelStyle> tags are written to .kml after loading.
Indeed, good catch. I'd suggest to add another protected virtual method to KmlColorStyleTagWriter with a signature of `virtual QColor defaultColor() const;` It can have a default implementation in KmlColorStyleTagWriter.cpp where it returns QColor( Qt::white ), and KmlLabelStyleTagWriter can overwrite it and return QColor( Qt::black ). Then change KmlColorStyleTagWriter::write to use that method (together with formatColor()) instead of using the hardcoded "ffffffff". - Dennis ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/123866/#review80741 ----------------------------------------------------------- On May 22, 2015, 5:24 p.m., Constantin Mihalache wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/123866/ > ----------------------------------------------------------- > > (Updated May 22, 2015, 5:24 p.m.) > > > Review request for Marble. > > > Repository: marble > > > Description > ------- > > Implemented the KmlLabelTagWriter which is useful for writing styles for > TextAnnotations. > > > Diffs > ----- > > src/lib/marble/geodata/CMakeLists.txt fe22e24 > src/lib/marble/geodata/writers/kml/KmlLabelStyleTagWriter.h PRE-CREATION > src/lib/marble/geodata/writers/kml/KmlLabelStyleTagWriter.cpp PRE-CREATION > > Diff: https://git.reviewboard.kde.org/r/123866/diff/ > > > Testing > ------- > > It works as expected. > > > Thanks, > > Constantin Mihalache > >
_______________________________________________ Marble-devel mailing list Marble-devel@kde.org https://mail.kde.org/mailman/listinfo/marble-devel