Skip to content

Commit

Permalink
set the widget to be visible before adding it to the view_layout
Browse files Browse the repository at this point in the history
  • Loading branch information
sssoleileraaa committed Mar 5, 2019
1 parent 1569888 commit 219b300
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions securedrop_client/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ def set_conversation(self, widget):
old_widget = self.view_layout.takeAt(0)

if old_widget:
old_widget.widget().setVisible(False)
old_widget.widget().hide()

self.view_layout.addWidget(widget)
widget.setVisible(True)
widget.show()


class SourceList(QListWidget):
Expand Down Expand Up @@ -694,7 +694,6 @@ def __init__(self, source_db_object: Source, sdc_home: str, controller: Client,
main_layout = QVBoxLayout()
main_layout.addWidget(self.scroll)
self.setLayout(main_layout)

self.update_conversation(self.source.collection)

def clear_conversation(self):
Expand Down Expand Up @@ -770,7 +769,7 @@ def add_reply(self, message_id: str, reply: str, files=None) -> None:
class SourceConversationWrapper(QWidget):
"""
Wrapper for a source's conversation including the chat window, profile tab, and other
per-soruce resources.
per-source resources.
"""

def __init__(self, source: Source, sdc_home: str, controller: Client, parent=None) -> None:
Expand Down

0 comments on commit 219b300

Please sign in to comment.