Skip to content

Commit

Permalink
Bugs resolved: Player stops now, if a new grid is generated and a new…
Browse files Browse the repository at this point in the history
… frame has now the duration given in the ui and not the default.
  • Loading branch information
Michael Puhl committed Oct 30, 2014
1 parent 51e4aad commit 797d4e1
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 29 deletions.
7 changes: 4 additions & 3 deletions blinkcomponents.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,10 @@ def rotate_right(self):
self._set_tile_colors(colors)

def stop_playback(self):
self.__play_idx = -1
self.timer.stop()
self.playback_stopped_event.emit(self.__play_on_device)
if self.__play_idx != -1:
self.__play_idx = -1
self.timer.stop()
self.playback_stopped_event.emit(self.__play_on_device)

def is_stopped(self):
return self.__play_idx == -1
Expand Down
5 changes: 4 additions & 1 deletion blinkgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def _color_button_clicked(self):
self._set_working_color(color.getRgb()[:3])

def _create_frame_button_clicked(self):
self.__grid.create_new_frame()
self.__grid.create_new_frame(self.durationSpinBox.value())
self.update_frame_controls()

def _delete_frame_button_clicked(self):
Expand Down Expand Up @@ -283,6 +283,9 @@ def _new_document(self):
if len(dimensions) != 2:
continue
if 0 < dimensions[0] <= 1000 and 0 < dimensions[1] <= 1000:
# Stop playback before creating a new Grid
if self.__grid is not None:
self.__grid.stop_playback()
self._initialize(dimensions)
break
else:
Expand Down
2 changes: 1 addition & 1 deletion color_transition_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file 'color_transition_dialog.ui'
#
# Created: Fri Oct 17 16:45:20 2014
# Created: Thu Oct 30 16:33:24 2014
# by: pyside-uic 0.2.15 running on PySide 1.2.2
#
# WARNING! All changes made in this file will be lost!
Expand Down
2 changes: 1 addition & 1 deletion ethernet_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file 'ethernet_dialog.ui'
#
# Created: Fri Oct 17 16:45:20 2014
# Created: Thu Oct 30 16:33:24 2014
# by: pyside-uic 0.2.15 running on PySide 1.2.2
#
# WARNING! All changes made in this file will be lost!
Expand Down
2 changes: 1 addition & 1 deletion lg_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file 'lg_dialog.ui'
#
# Created: Fri Oct 17 16:45:20 2014
# Created: Thu Oct 30 16:33:24 2014
# by: pyside-uic 0.2.15 running on PySide 1.2.2
#
# WARNING! All changes made in this file will be lost!
Expand Down
4 changes: 2 additions & 2 deletions mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file 'mainwindow.ui'
#
# Created: Fri Oct 17 16:45:20 2014
# Created: Thu Oct 30 16:33:24 2014
# by: pyside-uic 0.2.15 running on PySide 1.2.2
#
# WARNING! All changes made in this file will be lost!
Expand Down Expand Up @@ -94,7 +94,7 @@ def setupUi(self, MainWindow):
self.toolBar.setObjectName("toolBar")
MainWindow.addToolBar(QtCore.Qt.LeftToolBarArea, self.toolBar)
self.menuBar = QtGui.QMenuBar(MainWindow)
self.menuBar.setGeometry(QtCore.QRect(0, 0, 953, 20))
self.menuBar.setGeometry(QtCore.QRect(0, 0, 953, 24))
self.menuBar.setDefaultUp(False)
self.menuBar.setObjectName("menuBar")
self.menuFile = QtGui.QMenu(self.menuBar)
Expand Down
2 changes: 1 addition & 1 deletion mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
<x>0</x>
<y>0</y>
<width>953</width>
<height>20</height>
<height>24</height>
</rect>
</property>
<property name="defaultUp">
Expand Down
2 changes: 1 addition & 1 deletion res_rc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Resource object code
#
# Created: Fr. Okt 17 16:45:20 2014
# Created: Do. Okt 30 16:33:24 2014
# by: The Resource Compiler for PySide (Qt v4.8.6)
#
# WARNING! All changes made in this file will be lost!
Expand Down
2 changes: 1 addition & 1 deletion text_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file 'text_dialog.ui'
#
# Created: Fri Oct 17 16:45:20 2014
# Created: Thu Oct 30 16:33:24 2014
# by: pyside-uic 0.2.15 running on PySide 1.2.2
#
# WARNING! All changes made in this file will be lost!
Expand Down
34 changes: 17 additions & 17 deletions translations/blinkgui_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,27 @@
<translation>Maße eingeben (HxB):</translation>
</message>
<message>
<location filename="blinkgui.py" line="471"/>
<location filename="blinkgui.py" line="474"/>
<source>Undo</source>
<translation>Rückgängig</translation>
</message>
<message>
<location filename="blinkgui.py" line="475"/>
<location filename="blinkgui.py" line="478"/>
<source>Undo &quot;%s&quot;</source>
<translation>&quot;%s&quot; rückgängig machen</translation>
</message>
<message>
<location filename="blinkgui.py" line="481"/>
<location filename="blinkgui.py" line="484"/>
<source>SHIFT: Left-Click on a tile to record its color</source>
<translation>SHIFT: Links-Klicken auf eine Kachel, um die Farbe zu speichern</translation>
</message>
<message>
<location filename="blinkgui.py" line="483"/>
<location filename="blinkgui.py" line="486"/>
<source>CTRL: Left-Click to select multiple tiles</source>
<translation>CTRL: Links-Klicken um mehrere Kacheln auszuwählen</translation>
</message>
<message>
<location filename="blinkgui.py" line="539"/>
<location filename="blinkgui.py" line="542"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
Expand Down Expand Up @@ -103,7 +103,7 @@
<translation>Abspielen stoppen</translation>
</message>
<message>
<location filename="blinkgui.py" line="306"/>
<location filename="blinkgui.py" line="309"/>
<source>A connection already exists.</source>
<translation>Es besteht bereits eine Verbindung.</translation>
</message>
Expand All @@ -113,7 +113,7 @@
<translation>Frame importieren</translation>
</message>
<message>
<location filename="blinkgui.py" line="298"/>
<location filename="blinkgui.py" line="301"/>
<source>Connection could not be established.</source>
<translation>Verbindung konnte nicht aufgebaut werden.</translation>
</message>
Expand Down Expand Up @@ -401,21 +401,11 @@
<source>Go to &amp;previous frame</source>
<translation type="obsolete">Zu &amp;vorherigem Frame springen</translation>
</message>
<message>
<location filename="mainwindow.py" line="716"/>
<source>P</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.py" line="635"/>
<source>Go to &amp;next frame</source>
<translation type="obsolete">Zu &amp;nächstem Frame springen</translation>
</message>
<message>
<location filename="mainwindow.py" line="718"/>
<source>N</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.py" line="719"/>
<source>Select &amp;all</source>
Expand Down Expand Up @@ -871,6 +861,16 @@
<source>Ethernet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.py" line="716"/>
<source>P</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.py" line="718"/>
<source>N</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>TickerDialog</name>
Expand Down

0 comments on commit 797d4e1

Please sign in to comment.