diff --git a/src/Gui/CommandTest.cpp b/src/Gui/CommandTest.cpp index 4dae00cb64..ee2afc96a0 100644 --- a/src/Gui/CommandTest.cpp +++ b/src/Gui/CommandTest.cpp @@ -392,33 +392,33 @@ void CmdTestProgress3::activated(int iMsg) try { // level 1 - unsigned long steps = 5; - Base::SequencerLauncher seq1("Starting progress bar", steps); - for (unsigned long i=0; igetTypeId().isDerivedFrom(perspectivetype) : false; SbBool newisperspective = type.isDerivedFrom(perspectivetype); - if((oldisperspective && newisperspective) || - (!oldisperspective && !newisperspective)) // Same old, same old.. + if (oldisperspective == newisperspective) // Same old, same old.. return; diff --git a/src/Gui/View3DInventorExamples.cpp b/src/Gui/View3DInventorExamples.cpp index af70857964..cb03296280 100644 --- a/src/Gui/View3DInventorExamples.cpp +++ b/src/Gui/View3DInventorExamples.cpp @@ -323,8 +323,8 @@ const int texturewidth = 128; const int textureheight = 128; // Global variables -double cr = 0.33; -double ci = 0.43; +double global_cr = 0.33; +double global_ci = 0.43; // Global pointer //unsigned char * bitmap = new unsigned char[texturewidth*textureheight]; @@ -384,24 +384,24 @@ timersensorcallback(void * data, SoSensor *) SoTexture2 * texnode = (SoTexture2*) data; if (!direction) { - cr -= 0.0005; - ci += 0.0005; + global_cr -= 0.0005; + global_ci += 0.0005; } else { - cr += 0.0005; - ci -= 0.0005; + global_cr += 0.0005; + global_ci -= 0.0005; } - if (ci<0.30) + if (global_ci<0.30) direction = !direction; - else if (ci>0.83) + else if (global_ci>0.83) direction = !direction; SbVec2s size; int nc; unsigned char * image = texnode->image.startEditing(size, nc); // Generate a julia set to use as a texturemap - julia(cr, ci, 2.5, size[0], size[1], 4, image, 64); + julia(global_cr, global_ci, 2.5, size[0], size[1], 4, image, 64); texnode->image.finishEditing(); } @@ -411,7 +411,7 @@ void AnimationTexture(SoSeparator * root) if ( root == NULL ) return; // Shouldn't happen. // Generate a julia set to use as a texturemap - julia(cr, ci, 2.5, texturewidth, textureheight, 4, bitmap, 64); + julia(global_cr, global_ci, 2.5, texturewidth, textureheight, 4, bitmap, 64); SoTexture2 * texnode = texture(); @@ -434,6 +434,4 @@ void AnimationTexture(SoSeparator * root) root->addChild(hints); root->addChild(texnode); root->addChild(new SoCube); - - } - +}