summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgshaderedit.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/gshaderedit.in b/gshaderedit.in
index 3ed346e..17985f8 100755
--- a/gshaderedit.in
+++ b/gshaderedit.in
@@ -27,6 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import pygtk
pygtk.require ('2.0')
+
+import gobject
import gtk
import gtk.glade
@@ -73,6 +75,7 @@ class gShaderEdit ():
def show (self):
'''Show application'''
self.mainWindow.show_all ()
+ gobject.timeout_add (500, self.force_redraw)
def gtk_main_quit (self, *args):
'''Quit gtk main loop'''
@@ -187,6 +190,11 @@ class gShaderEdit ():
else:
self.previewArea.load_texture (file)
+ def force_redraw (self):
+ '''Redraw preview'''
+ if self.previewArea:
+ self.previewArea.redraw ()
+
if __name__ == "__main__":
editor = gShaderEdit ()
editor.show ()