Changeset 272:b80168ef552a for src/mlx/gui
- Timestamp:
- 07/03/12 14:52:59 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/callouts.py
r268 r272 255 255 editedIter = model.get_iter_from_string(path) 256 256 editedPath = model.get_path(editedIter) 257 if self._hasAltitude(newAltitude, ignorePath = editedPath): 257 otherPath = self._hasAltitude(newAltitude, ignorePath = editedPath) 258 if otherPath is not None: 258 259 dialog = gtk.MessageDialog(parent = self, 259 260 type = MESSAGETYPE_QUESTION, … … 273 274 if newAltitude is not None: 274 275 model[editedPath][0] = newAltitude 276 if otherPath is not None: 277 model.remove(model.get_iter(otherPath)) 275 278 276 279 def _saveApproachCallouts(self): … … 409 412 or not. 410 413 411 ignorePath is a path in the model to ignore.""" 414 ignorePath is a path in the model to ignore. 415 416 Returns the path of the element found, if any, or None, if the 417 altitude is not found.""" 412 418 model = self._fileListModel 413 419 iter = model.get_iter_first() … … 415 421 path = model.get_path(iter) 416 422 if path!=ignorePath and altitude==model[path][0]: 417 return True423 return path 418 424 iter = model.iter_next(iter) 419 425 420 return False426 return None 421 427 422 428 def _getNextValidUsualAltitude(self, startValue, descending):
Note:
See TracChangeset
for help on using the changeset viewer.