lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 586ba07 1/3: Refuse to paste out zero columns


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 586ba07 1/3: Refuse to paste out zero columns
Date: Fri, 15 Jun 2018 13:52:06 -0400 (EDT)

branch: master
commit 586ba07cc604855e9887bceaaada88358df95404
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Refuse to paste out zero columns
    
    Instead of pasting out a file with no columns, display an error message.
    
    This change may soon be reverted: it would seem better to disable the
    paste-out command in this situation, if that can be done economically.
---
 census_view.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/census_view.cpp b/census_view.cpp
index 1e85b88..8e792c8 100644
--- a/census_view.cpp
+++ b/census_view.cpp
@@ -1810,6 +1810,11 @@ void CensusView::DoPasteCensusOut() const
             }
         }
 
+    if(distinct_headers.empty())
+        {
+        alarum() << "All cells identical: nothing to paste out." << LMI_FLUSH;
+        }
+
     for(auto const& header : distinct_headers)
         {
         os << header << '\t';



reply via email to

[Prev in Thread] Current Thread [Next in Thread]