X-Git-Url: http://git.onelab.eu/?p=sface.git;a=blobdiff_plain;f=sface%2Fmainwindow.py;h=0b52d95670689bad917ae6632d5eeb43005edb07;hp=fde8ad8d503e2f0f8404ee1026ef5a6153bfcedc;hb=65c93a598a2f80c9040b21d675b9ee219def815e;hpb=875c4f3aa289cba9ed73de07e4e1fab1770ae9ec diff --git a/sface/mainwindow.py b/sface/mainwindow.py index fde8ad8..0b52d95 100644 --- a/sface/mainwindow.py +++ b/sface/mainwindow.py @@ -142,6 +142,9 @@ class MainWindow(QWidget): self.setStatus("Already showing %s" % curr_screen.getTitleText(), timeout=1000) return + # This is an optimization to have a smoother animation. We + # render the widget into a pixmap and animate that instead of + # moving the whole widget around. pixmap = QPixmap(self.screens.size()) curr_screen.render(pixmap) self.screens.setCurrentWidget(self.pix) @@ -172,4 +175,5 @@ class MainWindow(QWidget): self.status.set(msg, timeout) def nodeSelectionChanged(self, hostname): - self.rspecWindow.showNode(hostname) + if self.rspecWindow.isVisible(): + self.rspecWindow.showNode(hostname)