From: mkr Date: Thu, 31 Aug 2006 05:06:23 +0000 (+0000) Subject: Fix for bugs: X-Git-Tag: V3_2_2pre~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=60024a383c5c059779f56b4a9f9d84aa8fe61864;p=modules%2Fsuperv.git Fix for bugs: IPAL12363 : About edit function of loop node, IPAL12885 : To correct default indent for the edit field in "Init", "More", "Next" tabs of the "Edit Function" dlg. --- diff --git a/src/SUPERVGUI/SUPERVGUI_Service.cxx b/src/SUPERVGUI/SUPERVGUI_Service.cxx index 5fc07f4..2bdc79a 100644 --- a/src/SUPERVGUI/SUPERVGUI_Service.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Service.cxx @@ -706,9 +706,9 @@ void SUPERVGUI_Service::tabChanged(QWidget* theWidget) { -//***************************************************** +//*****************************************************/ // Pane for Python script editing -//***************************************************** +//*****************************************************/ SUPERVGUI_PythonEditPane::SUPERVGUI_PythonEditPane( QWidget* theParent, const bool isNodeCreation, int& theX, int& theY ) : myIsWithLibrary( isNodeCreation ), QFrame( theParent ), @@ -879,8 +879,10 @@ SUPERV_Strings SUPERVGUI_PythonEditPane::getFunction() { // it's user's responsibility to enter correct Python code, we don't do anything with it. // if (..) -- initial, while(..) -- my improvement, but also commented out -- needless. //if (!aLine.right(1).compare(" ")) // replaced with the line below -- loop - //while (aLine.at(aLine.length()-1).isSpace()) // remove trailing spaces - // aLine = aLine.remove(aLine.length()-1,1); + // uncommented by mkr to fix bugs IPAL12363, IPAL12885 --> + while (aLine.at(aLine.length()-1).isSpace()) // remove trailing spaces + aLine = aLine.remove(aLine.length()-1,1); + // <-- aStrings[i] = CORBA::string_dup(aLine.latin1()); } return aStrings._retn(); @@ -920,7 +922,7 @@ void SUPERVGUI_PythonEditPane::autoIndentLine() { i = -1; while ( line[++i].isSpace() ) // append all isSpace() characters at beginning of line to spacesStr spacesStr += line[i]; - + // if ':' was found -- add more spaces to spacesStr line = line.stripWhiteSpace(); if ( line[ line.length()-1 ] == ':' ) {