diff --git a/Source/Cliente/uPantallaPrincipal.pas b/Source/Cliente/uPantallaPrincipal.pas index 32bc3209..67edda56 100644 --- a/Source/Cliente/uPantallaPrincipal.pas +++ b/Source/Cliente/uPantallaPrincipal.pas @@ -209,6 +209,7 @@ end; procedure TfPantallaPrincipal.RefrescarUI; var ATitulo : String; + i: Integer; begin ATitulo := AppFactuGES.GetAppFullName; @@ -232,6 +233,13 @@ begin TBXStatusBar1.Panels[2].Caption := AppFactuGES.TiendaActiva.NOMBRE else TBXStatusBar1.Panels[2].Caption := 'Sin tienda por defecto'; + + // Comprobar que el panel lateral tiene la empresa activa + if Assigned(AppFactuGES.EmpresaActiva) then + for i := 0 to JvNavigationPane.PageCount - 1 do + if (JvNavigationPane.Pages[i].Tag = AppFactuGES.EmpresaActiva.ID) and + (JvNavigationPane.ActivePageIndex <> i) then + JvNavigationPane.ActivePageIndex := i; end; procedure TfPantallaPrincipal.ReleaseEmbedded; @@ -601,6 +609,7 @@ end; procedure TfPantallaPrincipal.Listadeempresas1_OLDClick(Sender: TObject); begin AppFactuGES.SeleccionarEmpresa; + RefrescarUI; end; procedure TfPantallaPrincipal.actConexionExecute(Sender: TObject);