Page 1 of 1
The annoying Bookmark bug is still in 1.5.0 !
Posted: 22.09.2007, 03:58
by Cham
I noticed a bug in the bookmarks menu. Apparently, according to Dirkpitt, it's an old bug that was introduced a long time ago and was "forgotten". As an example, I made a simple bookmark of the Milky Way, as seen from the outside :
cel://Follow/OGLE-TR-56/2004-01-08T05:5 ... lect=Milky Way&fov=38.300713&ts=1.000000<d=0&rf=578967&lm=0&ver=2
Then, each time I use the bookmark, the view is okay but it is selecting OGLE-TR-56 instead ! The bookmark bug is actually afflicting all my nebulae bookmarks. Each time I use one nebula bookmark from my favorites menu, I get the proper view of the nebula, but nothing is selected in the upper-left corner, even if the bookmark was made with a
selected nebula. This is annoying.
Posted: 22.09.2007, 10:24
by dirkpitt
Just to add, this bug is reproducible on both Windows and Mac (don't know about Linux). Just select any DSO, bookmark, then select the bookmark to go to the DSO again - a totally wrong object like OGLE-TR-56 will be selected instead. This bug has been around since at least Celestia-FT.
Posted: 22.09.2007, 10:42
by Vincent
I can indeed reproduce this bug on Windows.
I noticed it a while ago, but forgot to report it.
I agree with Martin: this bug is quite disturbing.
Posted: 22.09.2007, 10:57
by Vincent
I had a quick look into the favorites.cel file.
The selected object is defined in the "selection" field.
I tried to save a bookmark with the Milky Way as the selected object,
and then noticed that the selection field was wrongly defined as "#2".
I replaced "#2" with "Milky Way" and that fixed the problem.
So, a turn around would be to manually edit the favorites.cel file.
I'll have a look in the code to see if an easy fix can be found.
Posted: 22.09.2007, 11:58
by Vincent
The following change in celestiacore.cpp seems to fix the bug, at least on Windows:
Code: Select all
Index: src/celestia/celestiacore.cpp
===================================================================
RCS file: /cvsroot/celestia/celestia/src/celestia/celestiacore.cpp,v
retrieving revision 1.230
diff -u -r1.230 celestiacore.cpp
--- src/celestia/celestiacore.cpp 18 May 2007 19:14:38 -0000 1.230
+++ src/celestia/celestiacore.cpp 22 Sep 2007 11:53:34 -0000
@@ -445,7 +445,13 @@
fav->name = name;
fav->isFolder = false;
fav->parentFolder = parentFolder;
- fav->selectionName = sim->getSelection().getName();
+
+ Selection sel = sim->getSelection();
+ if (sel.deepsky() != NULL)
+ fav->selectionName = sim->getUniverse()->getDSOCatalog()->getDSOName(sel.deepsky());
+ else
+ fav->selectionName = sel.getName();
+
fav->coordSys = sim->getFrame().coordSys;
favorites->insert(pos, fav);
Martin, DW, could you test it on your system, please ?
Posted: 22.09.2007, 16:20
by Cham
Vincent,
I made the changes you posted, and after recompilation, I don't see any difference. The bookmarks behave (wrongly) the same. Maybe I didn't edited the code properly ? (but then I don't see what error I may have done : I removed the line associated to the "minus" you gave on line 449, and added the lines associated to the "+" you gave above. The compilation went fine).
Posted: 22.09.2007, 16:30
by dirkpitt
You did nothing wrong Cham - actually for some reason the Mac version is not using
the cross platform favorites storage (which is what Vincent's code patches), but has
duplicate code that was doing the same thing. (Why? I didn't code it so I don't know...)
Anyway, once this duplicate code was patched the bug appears to be fixed (thanks Vincent!)
The fix appears to be robust under different locales too, which was the main thing I was worrying about.
I've committed a temporary Mac-only fix for now (Cham: CVS has been updated,
Vincent: I only touched the Mac gui code - your patch for the cross platform celestiacore.cpp
still needs to be committed to make the fix available to other platforms).
A longer term solution would be to remove all the duplicate code in the Mac front end
and start using the cross platform favorites storage like every other platform.
Posted: 22.09.2007, 16:51
by Cham
Thanks DW, I'm updating...
Posted: 22.09.2007, 17:08
by Cham
Great ! It's working properly now !
Thanks a lot for both of you guys, Vincent and Da Woon.
At least, there is still hope to see some bug fixes and improvements in Celestia !
Posted: 22.09.2007, 17:15
by Vincent
dirkpitt wrote:I've committed a temporary Mac-only fix for now (Cham: CVS has been updated,
Vincent: I only touched the Mac gui code - your patch for the cross platform celestiacore.cpp
still needs to be committed to make the fix available to other platforms).
Cham wrote:Great ! It's working properly now !
Thanks a lot for both of you guys, Vincent and Da Woon.
At least, there is still hope to see some bug fixes and improvements in Celestia !
Good to know that the patch is working on both Mac and Windows.
I'll submit the change I made to the dev list...
Posted: 24.09.2007, 15:56
by Vincent
I've committed my change to CVS.
The bug should be fixed on all platforms now.