Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Matthews <johnny.matthews@gmail.com>2005-10-01 17:04:19 +0400
committerJohnny Matthews <johnny.matthews@gmail.com>2005-10-01 17:04:19 +0400
commit453fd9f532178372ed54007388714171baf587e0 (patch)
treec0bec4eafe9c55d873211eff4989ac372bf1673b /source/blender/src/editmesh_loop.c
parent8e3796f8d62d8af68ad9c963351fb09bf3211328 (diff)
A little more cleanup of the loopcut code. Hoping to gain some speed, and letting qread() finish its work instead of breaking. I think this may have been causing trouble.
Diffstat (limited to 'source/blender/src/editmesh_loop.c')
-rw-r--r--source/blender/src/editmesh_loop.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/source/blender/src/editmesh_loop.c b/source/blender/src/editmesh_loop.c
index f96843d43fb..30005ea5076 100644
--- a/source/blender/src/editmesh_loop.c
+++ b/source/blender/src/editmesh_loop.c
@@ -220,10 +220,7 @@ void CutEdgeloop(int numcuts)
BIF_undo_push("Loopcut Begin");
- while(choosing){
- if(cancel){
- break;
- }
+ while(choosing && !cancel){
getmouseco_areawin(mval);
if (mval[0] != mvalo[0] || mval[1] != mvalo[1]) {
mvalo[0] = mval[0];
@@ -254,11 +251,13 @@ void CutEdgeloop(int numcuts)
#endif
}
else PIL_sleep_ms(10); // idle
+
+
while(qtest())
{
val=0;
event= extern_qread(&val);
- if(event == MOUSEX || event == MOUSEY){ break; }
+ if(val && (event == MOUSEX || event == MOUSEY)){ ; }
else if(val && ((event==LEFTMOUSE || event==RETKEY) || (event == MIDDLEMOUSE || event==PADENTER)))
{
if(event == MIDDLEMOUSE){
@@ -268,27 +267,23 @@ void CutEdgeloop(int numcuts)
cancel = 1;
choosing=0;
mvalo[0] = -1;
- break;
}
else if(val && (event==ESCKEY || event==RIGHTMOUSE ))
{
choosing=0;
cancel = 1;
mvalo[0] = -1;
- break;
}
else if(val && (event==PADPLUSKEY || event==WHEELUPMOUSE))
{
numcuts++;
mvalo[0] = -1;
- break;
}
else if(val && (event==PADMINUS || event==WHEELDOWNMOUSE))
{
if(numcuts > 1){
numcuts--;
mvalo[0] = -1;
- break;
}
}
else if(val && event==SKEY)
@@ -296,7 +291,6 @@ void CutEdgeloop(int numcuts)
if(smooth){smooth=0;}
else { smooth=1; }
mvalo[0] = -1;
- break;
}
else if(val){
@@ -357,9 +351,9 @@ void CutEdgeloop(int numcuts)
}
mvalo[0] = -1;
break;
- }
- }
- }
+ } // End Numeric Entry
+ } //End while(qtest())
+ } // End Choosing
scrarea_queue_winredraw(curarea);
if(cancel){