Ignore:
Timestamp:
12/21/14 15:03:48 (10 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Eliminated some warnings when receiving the signal about inserting a text into the entry (re #235)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/flight.py

    r586 r587  
    21082108        self._metar.set_width_chars(40)
    21092109        self._metar.connect("changed", self._metarChanged)
    2110         self._metar.connect_after("insert-text", self._metarInserted)
     2110        self._metar.get_buffer().connect_after("inserted-text", self._metarInserted)
    21112111        table.attach(self._metar, 1, 24, row, row+1)
    21122112        label.set_mnemonic_widget(self._metar)
     
    25222522            self._wizard.metarChanged(entry.get_text(), self)
    25232523
    2524     def _metarInserted(self, entry, text, length, position):
     2524    def _metarInserted(self, buffer, position, text, length):
    25252525        """Called when new characters are inserted into the METAR.
    25262526
     
    25302530            self._updatingMETAR = True
    25312531
    2532             position = entry.get_position()
    2533             entry.delete_text(position, position + length)
    2534             entry.insert_text(text.upper(), position)
     2532            buffer.delete_text(position, length)
     2533            buffer.insert_text(position, text.upper(), length)
    25352534
    25362535            self._updatingMETAR = False
Note: See TracChangeset for help on using the changeset viewer.