Commit ac465bf7 authored by AustinSanders's avatar AustinSanders Committed by Jesse Mapel
Browse files

Added Table logic to copy label comments (#4496)



* Added logic to copy label comments

* Added comment logic to ToFromBlob test

Co-authored-by: default avatarAustin Sanders <arsanders@ugs.gov>
parent 0694c7d1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -442,6 +442,10 @@ namespace Isis {
      }
    }

    for (int i = 0; i < p_label.comments(); i++){
      blobLabel.addComment(p_label.comment(i));
    }

    for (int g = 0; g < p_label.groups(); g++) {
      blobLabel += p_label.group(g);
    }
+5 −1
Original line number Diff line number Diff line
@@ -144,6 +144,9 @@ TEST(TableTests, ToFromBlob) {
  rec[3] = -0.55;
  t += rec;

  QString comment = "test comment";
  t.Label().addComment(comment);

  Blob tableBlob = t.toBlob();

  Table t2(tableBlob);
@@ -153,6 +156,7 @@ TEST(TableTests, ToFromBlob) {
  EXPECT_EQ(t.IsSampleAssociated(), t2.IsSampleAssociated());
  EXPECT_EQ(t.IsLineAssociated(), t2.IsLineAssociated());
  EXPECT_EQ(t.IsBandAssociated(), t2.IsBandAssociated());
  EXPECT_EQ(t.Label().comments(), t2.Label().comments());

  ASSERT_EQ(t.Records(), t2.Records());
  for (int i = 0; i < t.Records(); i++) {