@@ -202,6 +202,7 @@ void SurfaceInspector::connectButtons()
202202 _alignTexture.right ->Connect (wxEVT_BUTTON, wxCommandEventHandler (SurfaceInspector::onUpdateAfterButtonClick), NULL , this );
203203 _alignTexture.left ->Connect (wxEVT_BUTTON, wxCommandEventHandler (SurfaceInspector::onUpdateAfterButtonClick), NULL , this );
204204 _modifyTex.natural ->Connect (wxEVT_BUTTON, wxCommandEventHandler (SurfaceInspector::onUpdateAfterButtonClick), NULL , this );
205+ _modifyTex.normalise ->Connect (wxEVT_BUTTON, wxCommandEventHandler (SurfaceInspector::onUpdateAfterButtonClick), NULL , this );
205206
206207 for (ManipulatorMap::iterator i = _manipulators.begin (); i != _manipulators.end (); ++i)
207208 {
@@ -212,6 +213,7 @@ void SurfaceInspector::connectButtons()
212213 wxutil::button::connectToCommand (_flipTexture.flipX , " FlipTextureX" );
213214 wxutil::button::connectToCommand (_flipTexture.flipY , " FlipTextureY" );
214215 wxutil::button::connectToCommand (_modifyTex.natural , " TextureNatural" );
216+ wxutil::button::connectToCommand (_modifyTex.normalise , " NormaliseTexture" );
215217
216218 wxutil::button::connectToCommand (_alignTexture.top , " TexAlignTop" );
217219 wxutil::button::connectToCommand (_alignTexture.bottom , " TexAlignBottom" );
@@ -452,6 +454,9 @@ void SurfaceInspector::populateWindow()
452454 _modifyTex.natural = new wxButton (this , wxID_ANY, _ (LABEL_NATURAL ));
453455 _modifyTex.natural ->SetToolTip (_ (TT_NATURAL ));
454456 modTextureBox->Add (_modifyTex.natural , 0 , wxEXPAND);
457+ _modifyTex.normalise = new wxButton (this , wxID_ANY, _ (" Normalise" ));
458+ _modifyTex.normalise ->SetToolTip (_ (" Shift texture coordinates towards the origin" ));
459+ modTextureBox->Add (_modifyTex.normalise , 0 , wxEXPAND | wxLEFT, 6 );
455460 wxStaticText* defaultScaleLabel = new wxStaticText (this , wxID_ANY, _ (LABEL_DEFAULT_SCALE ));
456461 modTextureBox->Add (defaultScaleLabel, 0 , wxLEFT | wxALIGN_CENTER_VERTICAL, 6 );
457462
@@ -647,6 +652,7 @@ void SurfaceInspector::doUpdate()
647652
648653 // The natural/normalise widget sensitivity
649654 _modifyTex.natural ->Enable (haveSelection);
655+ _modifyTex.normalise ->Enable (haveSelection);
650656
651657 // Current shader name
652658 _shaderEntry->SetValue (selection::getShaderFromSelection ());
0 commit comments