Page 1 of 1

Bug with star names as the empty string

Posted: 03.09.2011, 12:37
by refsteff
Hello,

after I've enabled localizations in Linux (celestia svn 5166 Qt4) and tried some addons, I realized the same behavior that was described here:
http://www.shatters.net/forum/viewtopic.php?f=3&t=11690
but with stars (fictional or real). I've tried it with rthorvalds sun addons (with the update to 1.5+) and his ringworld's star addon - all the same.

th_sun_error2.png

this happens everytime If call the selection popup and select planets.
The next is difficult to reproduce, it depends on the distance and where you click on the star.

th_sun_error.png

Other star addons without empty names in their .ssc file were working.

See you

refsteff

Re: Bug with star names as the empty string

Posted: 04.09.2011, 22:02
by John Van Vliet
--- edit ---

Re: Bug with star names as the empty string

Posted: 05.09.2011, 02:41
by Fenerit
John, the use of "" in which there is not space between, is working for Linux?

Re: Bug with star names as the empty string

Posted: 05.09.2011, 03:38
by John Van Vliet
--- edit ---

Re: Bug with star names as the empty string

Posted: 05.09.2011, 04:04
by Fenerit
Ok, understood.

Re: Bug with star names as the empty string

Posted: 05.09.2011, 17:48
by ajtribick
Are such empty names actually something we should support in the first place? Is this really useful?

Re: Bug with star names as the empty string

Posted: 05.09.2011, 17:56
by selden
Somehow one needs to be able to define components of spacecraft or other 3D objects in a way which does not cause them to be listed in the Solar System Browser. This is particularly important for objects with a very large number of components. Traditionally this has been done by using an empty name " ". Although Celestia complains, that works reasonably well for the intended purpose. There was a request for a declaration like 'Listable false', similar to 'Clickable false', but it didn't get implemented.

p.s. the Hale Telescope addon illustrates the "too many components" problem quite well. http://www.lepp.cornell.edu/~seb/celest ... scope.html

Re: Bug with star names as the empty string

Posted: 05.09.2011, 22:08
by refsteff
Hello john,
john Van Vliet wrote:Unfortunately you will have to fix them on your own
i have been trying to get the creators to FIX THERM - but they refuse
or are no longer active and can not fix them .

---- the fix ( might vary a bit on some ) ----
1) name them 1 ,2, 3, or a,b,c,d,...... will do
2) a second error caused by this ( looks like you missed this )
the object in NOT clickable or no menu

You mentioned a star
no r-click menu until fixed

add

Code: Select all

     Visible true
     Clickable false # or " true"

to EVERY blank " "
for the selection popup ( the first bug I mentioned) I find a (until now dirty) workaround:

Code: Select all

--- celestia.org/src/celestia/qt/qtselectionpopup.cpp   2011-09-03 09:54:08.000000000 +0200
+++ celestia/src/celestia/qt/qtselectionpopup.cpp   2011-09-03 15:45:24.000000000 +0200
@@ -399,13 +399,21 @@
                     }
                     menu = new QMenu(title, this);
                 }
-               
-                QAction* act = new QAction(QString::fromUtf8(body->getName(true).c_str()), menu);
-                act->setData(i);
-                connect(act, SIGNAL(triggered()), this, SLOT(slotSelectChildObject()));
-                menu->addAction(act);
+                QString name = QString::fromUtf8(body->getName(true).c_str());
+                if (!name.contains("Project-Id-Version:"))
+                {
+                    QAction* act = new QAction(name, menu);
+                    act->setData(i);
+                    connect(act, SIGNAL(triggered()), this, SLOT(slotSelectChildObject()));
+                    menu->addAction(act);
+                }
             }
         }
+        if(menu != NULL && menu->isEmpty())
+        {
+            delete menu;
+            menu = NULL;
+        }
     }
 
     return menu;

I have to test it seriously (I'm not a C++ programmer, so I don't know if *delete menu* is the right choice), and this don't solve the output on the 2nd picture.
btw. is there a detailed description of the celestia core classes/methods available (until now I just find some old pages or outdated links and even I'm not very familiar with C++ it would be helpful to find an accurate solution)?
PS. on a different note OpenSUSE 11.2 hit End Of Life on
openSUSE 11.2 - May 12th 2011
about 3.5 months ago .Time to upgrade to 11.4

unless you are using the partial backport support "Evergreen"
I know that, this belongs to every Linux distribution (I use Linux since ~16 years ). I do use "Evergreen", it's very helpful and for several reasons I can't upgrade( to many software from "outer space" :) that an upgrade wants to remove :roll: ).

Thank you for your reply

refsteff