[Kstars-devel] branches/KDE/3.5/kdeedu/kstars/kstars

Jasem Mutlaq mutlaqja at ikarustech.com
Tue Nov 20 07:22:54 CET 2007


SVN commit 738998 by mutlaqja:

Fixing menu-to-command mapping for all INDI devices. This is a quick fix for the problem. It
was solved in KDE 4 branch using a completely different approach.
BUG:152453
CCMAIL:kstars-devel at kde.org


 M  +7 -4      indiproperty.cpp  


--- branches/KDE/3.5/kdeedu/kstars/kstars/indiproperty.cpp #738997:738998
@@ -203,21 +203,24 @@
 {
  
  INDI_E *lp;
+ QString mLabel;
  int switchIndex=0;
  
  if (assosiatedPopup == NULL)
   return;
 
+  mLabel = assosiatedPopup->text(id).replace("&", "");
+
   //kdDebug() << "Name: " << name << " ID: " << id << endl;
  /* Special case is CCD_EXPOSE_DURATION, not a switch */
- if (stdID == CCD_EXPOSE_DURATION && assosiatedPopup->text(id) == label)
+ if (stdID == CCD_EXPOSE_DURATION && mLabel.find(label) != -1)
  {
    newText();
    return;
  }
 
  /* Another special case, center telescope */
- if (assosiatedPopup->text(id) == i18n("Center && Track Crosshair"))
+ if (mLabel.find("Crosshair") != -1)
  {
         if (!indistd->stdDev->dp->isOn()) return;
 	if (indistd->stdDev->telescopeSkyObject == NULL) return;
@@ -227,14 +230,14 @@
 	return;
  }
    
- lp = findElement(assosiatedPopup->text(id));
+ lp = findElement(mLabel);
  
  if (!lp)
    return;
    
  for (uint i=0; i < el.count(); i++)
  {
-   if (el.at(i)->label == assosiatedPopup->text(id))
+   if (el.at(i)->label == mLabel)
    {
      switchIndex = i;
      break;


More information about the Kstars-devel mailing list