diff src/libqxt/qxtcsvmodel.cpp @ 17:73efe717b944

Fix bug in csv model to allow changing headerdata
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 14 Apr 2015 18:55:55 +0200
parents 7a2637c3eb83
children 0c05958d254c
line wrap: on
line diff
--- a/src/libqxt/qxtcsvmodel.cpp	Tue Apr 14 17:25:44 2015 +0200
+++ b/src/libqxt/qxtcsvmodel.cpp	Tue Apr 14 18:55:55 2015 +0200
@@ -265,7 +265,7 @@
 bool QxtCsvModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role)
 {
     if(orientation != Qt::Horizontal) return false;                   // We don't support the vertical header
-    if(role != Qt::DisplayRole || role != Qt::EditRole) return false; // We don't support any other roles
+    if(role != Qt::DisplayRole && role != Qt::EditRole) return false; // We don't support any other roles
     if(section < 0) return false;                                     // Bogus input
     while(section > qxt_d().header.size()) {
         qxt_d().header << QString();
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)