[rkward-cvs] SF.net SVN: rkward-code:[4841] trunk/rkward/rkward/plugin/rkoptionset.cpp

tfry at users.sf.net tfry at users.sf.net
Mon Sep 22 15:35:16 UTC 2014


Revision: 4841
          http://sourceforge.net/p/rkward/code/4841
Author:   tfry
Date:     2014-09-22 15:35:16 +0000 (Mon, 22 Sep 2014)
Log Message:
-----------
Use alternating row colors in optionset display

Modified Paths:
--------------
    trunk/rkward/rkward/plugin/rkoptionset.cpp

Modified: trunk/rkward/rkward/plugin/rkoptionset.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkoptionset.cpp	2014-09-20 15:42:39 UTC (rev 4840)
+++ trunk/rkward/rkward/plugin/rkoptionset.cpp	2014-09-22 15:35:16 UTC (rev 4841)
@@ -169,6 +169,7 @@
 		model->column_labels = visible_column_labels;
 		display->setItemsExpandable (false);
 		display->setRootIsDecorated (false);
+		display->setAlternatingRowColors (true);
 		if (display_show_index) display->resizeColumnToContents (0);
 		else display->setColumnHidden (0, true);
 		display->setModel (model);
@@ -192,7 +193,7 @@
 	RK_TRACE (PLUGIN);
 	RK_ASSERT (default_row_state.isEmpty ());
 	contents_container->fetchPropertyValuesRecursive (&default_row_state, false, QString (), true);
-	if (min_rows && !keycolumn) addRow ();
+	if (min_rows && !keycolumn && (rowCount () <= 0)) addRow ();
 	contents_container->enablednessProperty ()->setBoolValue (rowCount () > 0);	// no current row; Do this *after* fetching default values, however. Otherwise most values will *not* be read, as the element is disabled
 }
 





More information about the rkward-tracker mailing list