File fix-plib.patch of Package crrcsim

diff -Nur crrcsim-0.9.13/src/GUI/crrc_loadrobot.cpp new/src/GUI/crrc_loadrobot.cpp
--- crrcsim-0.9.13/src/GUI/crrc_loadrobot.cpp	2016-04-10 18:57:14.000000000 +0200
+++ new/src/GUI/crrc_loadrobot.cpp	2021-04-16 03:58:32.870804368 +0200
@@ -78,7 +78,7 @@
                                           1,    // num of arrow pairs
                                           SCROLL_W,   // slider width
                                           1);   // wrap text
-  help->setText(_("In case you check the box above, this robot will replace your manually controlled airplane.\n"
+  help->addText(_("In case you check the box above, this robot will replace your manually controlled airplane.\n"
                 "Load an airplane to regain manual control."));
   help->disableInput();
     
@@ -104,7 +104,7 @@
                                   16,   // slider width
                                   0);   // wrap text
   description->disableInput();
-  description->setText(_("This is a short description of the selected record."));
+  description->addText(_("This is a short description of the selected record."));
 
   // finalize the dialog
   close();
@@ -136,7 +136,7 @@
 void CGUILoadRobotDialog::updateFileInfo()
 {
   RobotFile* rf = new RobotFile(getFilename());
-  description->setText(rf->ReadDescription().c_str());
+  description->addText(rf->ReadDescription().c_str());
   delete rf;
 }
 
diff -Nur crrcsim-0.9.13/src/GUI/crrc_location.cpp new/src/GUI/crrc_location.cpp
--- crrcsim-0.9.13/src/GUI/crrc_location.cpp	2016-04-10 18:57:14.000000000 +0200
+++ new/src/GUI/crrc_location.cpp	2021-04-16 03:58:32.870804368 +0200
@@ -208,7 +208,7 @@
                                   16,   // slider width
                                   1);   // wrap text
   description->disableInput();
-  description->setText("This is a short description of the selected scenery.");
+  description->addText("This is a short description of the selected scenery.");
   /*description->setLabelPlace(PUPLACE_TOP_LEFT);
   description->setLabel(_("Description:"));*/
 
@@ -290,7 +290,7 @@
       description_string = _("No description available.");
     }
     description_string = T_GUI_Util::cleanText(description_string);
-    description->setText(description_string.c_str());
+    description->addText(description_string.c_str());
     description->setTopLineInWindow(0);
     description->setSelectRegion (0,0) ;
     delete xml;
diff -Nur crrcsim-0.9.13/src/GUI/crrc_planesel.cpp new/src/GUI/crrc_planesel.cpp
--- crrcsim-0.9.13/src/GUI/crrc_planesel.cpp	2016-04-10 18:57:14.000000000 +0200
+++ new/src/GUI/crrc_planesel.cpp	2021-04-16 03:58:32.874804403 +0200
@@ -106,7 +106,7 @@
                                   16,   // slider width
                                   1);   // wrap text
   description->disableInput();
-  description->setText("This is a short description of the selected model.");
+  description->addText("This is a short description of the selected model.");
 
   // Use launch default check box
   check_useLaunchDefault = new puButton(x1,             y2-4*DLG_DEF_BUTTON_HEIGHT-DLG_DEF_SPACE,             // x, y lower left
@@ -635,7 +635,7 @@
       #endif
     }
     description_string = T_GUI_Util::cleanText(description_string);
-    description->setText(description_string.c_str());
+    description->addText(description_string.c_str());
     description->setTopLineInWindow(0);
     description->setSelectRegion (0,0) ;
 
diff -Nur crrcsim-0.9.13/src/GUI/crrc_setrecordname.cpp new/src/GUI/crrc_setrecordname.cpp
--- crrcsim-0.9.13/src/GUI/crrc_setrecordname.cpp	2016-04-10 18:57:14.000000000 +0200
+++ new/src/GUI/crrc_setrecordname.cpp	2021-04-16 04:15:20.015844883 +0200
@@ -61,7 +61,7 @@
                                           1,    // num of arrow pairs
                                           SCROLL_W,   // slider width
                                           1);   // wrap text
-  help->setText(_("Both filename and description become effective when the flight log is finally closed (on flight reset, change of airplane/location, exit).\n"
+  help->addText(_("Both filename and description become effective when the flight log is finally closed (on flight reset, change of airplane/location, exit).\n"
                 "Without a name, the log will not be saved!\n"
                 "Your best F3F runs are named (and therefore saved) automatically.\n"
                 "Replay flight logs using 'Robots | Load Robot'."));
@@ -85,7 +85,7 @@
                                   1);   // wrap text
   description->setLabelPlace(PUPLACE_TOP_LEFT);
   description->setLabel(_("Description:"));
-  description->setText(Global::recorder->descr.c_str());
+  description->addText(Global::recorder->descr.c_str());
 
   // finalize the dialog
   close();
@@ -113,7 +113,7 @@
     
   if (obj->getIntegerValue() == CRRC_DIALOG_OK)
   {
-    Global::recorder->descr = dlg->description->getText();
+    Global::recorder->descr = dlg->description->getDisplayedText();
     Global::recorder->SetFilename(dlg->filename->getStringValue());
   }
   
openSUSE Build Service is sponsored by