labscript-suite / runviewer

π—Ώπ˜‚π—»π˜ƒπ—Άπ—²π˜„π—²π—Ώ is a graphical interface for visualising hardware-timed experiments composed using the 𝘭𝘒𝘣𝘴𝘀𝘳π˜ͺ𝘱𝘡 𝘴𝘢π˜ͺ𝘡𝘦.
http://labscriptsuite.org
BSD 2-Clause "Simplified" License
2 stars 39 forks source link

Bug in the UI #11

Closed philipstarkey closed 7 years ago

philipstarkey commented 7 years ago

Original report (archived issue) by Jan Werkmann (Bitbucket: PhyNerd, GitHub: PhyNerd).


When canceling the select file dialog I get this error: Bildschirmfoto 2017-06-22 um 20.36.16.png

philipstarkey commented 7 years ago

Original comment by Jan Werkmann (Bitbucket: PhyNerd, GitHub: PhyNerd).


The second Bug should be fixed by replacing:

#!python
        self.last_opened_shots_folder = os.path.dirname(selected_files[0])

with :

#!python
        if len(selected_files)>0:
            self.last_opened_shots_folder = os.path.dirname(selected_files[0])
philipstarkey commented 7 years ago

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Are you sure about the first one? It looks like that variable is defined two lines earlier, and I'm not seeing any way it could be deleted in the intervening line:

#!python

                icon = QIcon(pixmap)
                colour_item.setData(lambda clist=self.shot_colour_delegate._colours, colour=colour: int_to_enum(clist, colour), Qt.UserRole)
                colour_item.setData(icon, Qt.DecorationRole)
philipstarkey commented 7 years ago

Original comment by Jan Werkmann (Bitbucket: PhyNerd, GitHub: PhyNerd).


philipstarkey commented 7 years ago

Original comment by Jan Werkmann (Bitbucket: PhyNerd, GitHub: PhyNerd).


You are right, my bad. I missed deleting the lines beneath the else branch when manually updating my runviewer.

philipstarkey commented 7 years ago

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


No problem, thanks for reporting the other one.

philipstarkey commented 7 years ago

Original comment by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey).


Merged in monashkrb/runviewer/bugfix (pull request #10)

Fixed issue #11 where not selecting a file would result in an error

Approved-by: Philip Starkey philip.starkey@monash.edu

β†’ \<\<cset 056df5d0e2330145df2829c46889fc9ab0f3cbbd>>

philipstarkey commented 7 years ago

Original comment by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey).


Fixed issue #11 where not selecting a file would result in an error

β†’ \<\<cset 740dc8a7624b2e2cc1c3f786c83313a8219e6c48>>

philipstarkey commented 7 years ago

Original comment by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey).


Merged in monashkrb/runviewer/bugfix (pull request #10)

Fixed issue #11 where not selecting a file would result in an error

Approved-by: Philip Starkey philip.starkey@monash.edu

β†’ \<\<cset 056df5d0e2330145df2829c46889fc9ab0f3cbbd>>