Author Topic: [UE] Selected favorite tabs are changed when changing db  (Read 287 times)

ubacher

  • Oldtimer
  • ****
  • Posts: 2521
[UE] Selected favorite tabs are changed when changing db
« on: April 18, 2022, 04:13:56 PM »
When changing from one db to another the favorite tabs which are selected depend on the
sequence of the ones from the previous database.

It gets very confusing because the order of the tabs gets changed also.
Easiest way to demonstrate:
Have 8 favorite tabs in one db, select the 8th to be displayed.

Switch to another db which has less than 8 tabs and only 1 selected.
After the switch all favorite tabs are selected.

(Another problem is that toolbar icons disappear when switching - since this may be caused by this problem
we need not investigate this for now.)

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 31554
Re: Selected favorite tabs are changed when changing db
« Reply #1 on: April 18, 2022, 04:29:30 PM »
Quote
Switch to another db which has less than 8 tabs and only 1 selected.
After the switch all favorite tabs are selected.

I don't follow, sorry.

When I recall correctly, the visible tabs in the Favorite panel are a per-database setting.
Since most favorites are database-dependent, this is a requirement.

I understand you have one database for which you created 8 separate tabs in the Favorites panel? How unusual.
And all these tabs are visible (there is no "selection", in that sense).

And you now switch to another database which has a totally different and independent set of favorite tabs.
And now what happens, exactly?

When I switch from a database which has the default tabs + 3 to a database which has the default tabs + 1 and then back, the tabs I have made visible in database 1 are still visible.
They cannot be visible in database 2, since each database has its own set of favorite tabs.

ubacher

  • Oldtimer
  • ****
  • Posts: 2521
Re: Selected favorite tabs are changed when changing db
« Reply #2 on: April 19, 2022, 09:18:36 AM »
I made a visual explanation since this can be very confusing.

It shows what happens to favorites when I switch between db "S" and db "T"

ubacher

  • Oldtimer
  • ****
  • Posts: 2521
Re: Selected favorite tabs are changed when changing db
« Reply #3 on: April 20, 2022, 06:13:41 PM »
I should say how I change dbs:
With one db open I go to Database and then select the wanted db from the list.

I tried closing db before opening another one but this does not seem to make a difference.


Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 31554
Re: Selected favorite tabs are changed when changing db
« Reply #4 on: April 21, 2022, 10:54:55 AM »
The selected favorites are stored per-database and per user as part of the workspace.
Which means that each database/workspace combination for your user account as a separate favorite layout.

When the Fav Panel loads, it loads the favorite settings for the current database and current workspace from the settings database.
When you make changes, like showing or hiding favorite sets, the new layout is stored in the settings database. Again, for the current database and workspace.

Did you duplicate a database at some time but without changing the database id?
See When You Copy a Database: Change Database ID

Did you copy/merge a settings database file at some time perhaps? Causing this problem?
I recall you had another rather unique problem related to favorites a while ago, something only you ever experienced and I could never reproduce...?

Maybe create a new, clean workspace in both databases to see if this solves the problem with your favorites?

ubacher

  • Oldtimer
  • ****
  • Posts: 2521
Re: Selected favorite tabs are changed when changing db
« Reply #5 on: April 21, 2022, 03:45:37 PM »
Is there a way to see the database ID? It's not on the dashboard nor in the log file.
This would tell me if that is the problem. (I think that might be the case!)

or
Could I just change the db ID of one of the db's anyway without harm? Probably need to change the name
of the db at the same time.

Quote
Did you copy/merge a settings database file at some time perhaps?
Not that I know.
Quote
Maybe create a new, clean workspace in both databases to see if this solves the problem with your favorites?

How? Deleting the files in the config folder?
And would that help if the db id's are the same?


Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 31554
Re: Selected favorite tabs are changed when changing db
« Reply #6 on: April 21, 2022, 04:40:34 PM »
Look at the cache folder in the dashboard or Info & Activity panel.
Each database has it's own root folder below the cache folder, in form of a GUID. Looks like ABB1A432-D431-46F6-9A96-8C3322EA4C83\

When you change the ID of a database, all database-related settings stored in the settings database are lost and will be re-created from defaults after you reload the database in IMatch.
This operation is only needed (and recommended) when you duplicate a database, to work with two separate databases in the future.
You DO NOT do this when you just copy a database to another PC and back.

ubacher

  • Oldtimer
  • ****
  • Posts: 2521
Re: Selected favorite tabs are changed when changing db
« Reply #7 on: April 21, 2022, 06:57:25 PM »
The two dbs had indeed the same ID. I changed the ID of one and now all seems well.
( I did not notice having lost any settings
I am confident this will also solve the other problems I have had when changing db's.

I can figure out how this happened: I copied my main db to the laptop where I stripped it
down, renamed it and used it for "This Years" work. Later I copied this db back to the desktop - now I had two dbs with
the same number.

Thank you for your help - and sorry for having screwed up.

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 31554
Re: Selected favorite tabs are changed when changing db
« Reply #8 on: April 21, 2022, 07:27:05 PM »
Well, this would explain this.

There are only a few database-specific settings stored in the global settings database for technical reasons.
Most per-database settings are stored in the database itself and hence work even if you clone a database without changing the unique id as required.