[rkward-cvs] rkward/rkward/misc rkobjectlistview.cpp,1.7,1.8

Thomas Friedrichsmeier tfry at users.sourceforge.net
Fri Apr 15 17:24:59 UTC 2005


Update of /cvsroot/rkward/rkward/rkward/misc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24359/misc

Modified Files:
	rkobjectlistview.cpp 
Log Message:
Hidded objects (names starting with a dot) only get hidden in the ObjectListView, too(previously not generated at all)

Index: rkobjectlistview.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/misc/rkobjectlistview.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** rkobjectlistview.cpp	5 Apr 2005 08:18:09 -0000	1.7
--- rkobjectlistview.cpp	15 Apr 2005 17:24:56 -0000	1.8
***************
*** 134,143 ****
  void RKObjectListView::updateItem (QListViewItem *item, RObject *object) {
  	RK_TRACE (APP);
  
- 	// if the objec is hidden, it shouldn't appear
- 	QString  temp  = (QString) object->getFullName()  ;
- 	if (temp.left(1).latin1() == (QString) ".") return ;
- 
- 		
  	item->setText (0, object->getShortName ());
  	item->setText (1, object->getLabel ());
--- 134,139 ----
  void RKObjectListView::updateItem (QListViewItem *item, RObject *object) {
  	RK_TRACE (APP);
+ 	qDebug ("object name: %s", object->getFullName().latin1 ());
  
  	item->setText (0, object->getShortName ());
  	item->setText (1, object->getLabel ());
***************
*** 170,173 ****
--- 166,172 ----
  		}
  	}
+ 
+ 	// if the object is hidden, it shouldn't appear
+ 	if (object->getFullName ().startsWith (".")) item->setVisible (false);
  }
  
***************
*** 175,182 ****
  	RK_TRACE (APP);
  	
- 	// if the objec is hidden, it shouldn't appear
- 	QString  temp  = (QString) object->getFullName()  ;
- 	if (temp.left(1).latin1() == (QString) ".") return ;
- 
  	QListViewItem *item;
  
--- 174,177 ----
***************
*** 205,208 ****
--- 200,207 ----
  		item->setOpen (true);
  	}
+ 
+ 	// if the object is hidden, it shouldn't appear
+ 	if (object->getFullName ().startsWith (".")) item->setVisible (false);
+ 
  // code below won't work, as objects get added before editor is opened. Need to call from RKEditor(Manager)
  /*	if (object->numChildren () && RKGlobals::editorManager ()->objectOpened (object)) {





More information about the rkward-tracker mailing list