]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
Fix for bugs:
authormkr <mkr@opencascade.com>
Thu, 31 Aug 2006 05:06:23 +0000 (05:06 +0000)
committermkr <mkr@opencascade.com>
Thu, 31 Aug 2006 05:06:23 +0000 (05:06 +0000)
 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.

src/SUPERVGUI/SUPERVGUI_Service.cxx

index 5fc07f47a8aa9366dcf34372fe4730529d67c3bd..2bdc79a3a1ca7327356732c6530bf12b8beb6b76 100644 (file)
@@ -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 ] == ':' ) {