changeset 36901:97a16ac7f8dd

Simplify code.
author ib
date Wed, 12 Mar 2014 12:07:51 +0000
parents ecf965eee74d
children 6f52d357f7a5
files gui/ui/main.c gui/ui/playbar.c
diffstat 2 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/gui/ui/main.c	Wed Mar 12 12:01:40 2014 +0000
+++ b/gui/ui/main.c	Wed Mar 12 12:07:51 2014 +0000
@@ -193,12 +193,10 @@
             case itPRMButton:
                  if (guiApp.menuIsPresent) guiApp.menuWindow.MouseHandler( 0,RX,RY,0,0 );
                  break;
-            case itPotmeter:
-                 item->value=100.0 * ( X - item->x ) / item->width;
-                 goto potihandled;
             case itVPotmeter:
                  item->value=100.0 - 100.0 * ( Y - item->y ) / item->height;
                  goto potihandled;
+            case itPotmeter:
             case itHPotmeter:
                  item->value=100.0 * ( X - item->x ) / item->width;
 potihandled:
--- a/gui/ui/playbar.c	Wed Mar 12 12:01:40 2014 +0000
+++ b/gui/ui/playbar.c	Wed Mar 12 12:07:51 2014 +0000
@@ -214,12 +214,10 @@
 	  case itPRMButton:
 	       if (guiApp.menuIsPresent) guiApp.menuWindow.MouseHandler( 0,RX,RY,0,0 );
 	       break;
-	  case itPotmeter:
-	       item->value=100.0 * ( X - item->x ) / item->width;
-	       goto potihandled;
 	  case itVPotmeter:
 	       item->value=100.0 - 100.0 * ( Y - item->y ) / item->height;
 	       goto potihandled;
+	  case itPotmeter:
 	  case itHPotmeter:
 	       item->value=100.0 * ( X - item->x ) / item->width;
 potihandled: