Changeset 3350
- Timestamp:
- 05/14/08 20:55:08 (2 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/opus_gui/config/xmlmodelview/opusdatamodel.py
r3324 r3350 289 289 if not domElement.isNull(): 290 290 domElement.setTagName(value.toString()) 291 if self.dirty == False: 292 wintitle = self.parentObj.windowTitle().replace(" - ", " - *") 293 self.parentObj.setWindowTitle(wintitle) 294 self.dirty = True 291 self.markAsDirty() 295 292 elif index.column() == 1: 296 293 if domNode.hasChildNodes(): … … 299 296 if children.item(x).isText(): 300 297 children.item(x).setNodeValue(QString(value.toString())) 301 if self.dirty == False: 302 wintitle = self.parentObj.windowTitle().replace(" - ", " - *") 303 self.parentObj.setWindowTitle(wintitle) 304 self.dirty = True 298 self.markAsDirty() 305 299 else: 306 300 #print "New text node to be added" … … 308 302 newText = self.domDocument.createTextNode(QString(value.toString())) 309 303 domNode.appendChild(newText) 310 if self.dirty == False: 311 wintitle = self.parentObj.windowTitle().replace(" - ", " - *") 312 self.parentObj.setWindowTitle(wintitle) 313 self.dirty = True 304 self.markAsDirty() 314 305 return True 315 306 … … 334 325 self.endInsertRows() 335 326 #print "debug" 327 self.markAsDirty() 336 328 return returnval 337 329 … … 347 339 parentItem.childItems.pop(row) 348 340 self.endRemoveRows() 341 self.markAsDirty() 349 342 return returnval 350 343 … … 359 352 self.removeRow(currentRow,currentParent) 360 353 self.insertRow(currentRow-howmany,currentParent,clone) 354 self.markAsDirty() 361 355 362 356 def moveDown(self,item,howmany=1): … … 374 368 self.removeRow(currentRow,currentParent) 375 369 self.insertRow(currentRow+howmany,currentParent,clone) 370 self.markAsDirty() 376 371 377 372 def findElementIndexByName(self,name,parent,multiple=False): … … 451 446 newNode.setAttribute(QString("type"),QString(type)) 452 447 newText = document.createTextNode(QString(value)) 453 newNode.appendChild(newText) 454 448 newNode.appendChild(newText) 455 449 if choices is not None: 456 450 newNode.setAttribute(QString('choices'), QString(choices)) 451 self.markAsDirty() 457 452 return newNode 458 453 … … 463 458 # remove the attribute 464 459 parentElement.removeAttribute(QString(attribute)) 460 self.markAsDirty() 465 461 rows = parent.childNodes().count() 466 462 for x in xrange(0,rows,1): … … 472 468 # remove the attribute 473 469 childElement.removeAttribute(QString(attribute)) 470 self.markAsDirty() 474 471 # If this child has other children then we recurse 475 472 childRows = child.childNodes().count() … … 484 481 # remove the attribute 485 482 parentElement.removeAttribute(QString(attribute)) 483 self.markAsDirty() 486 484 grandParent = parent.parentNode() 487 485 if not grandParent.isNull():
