v...@lyx.org wrote:
> Author: vfr
> Date: Mon May  4 13:53:34 2009
> New Revision: 29532
> URL: http://www.lyx.org/trac/changeset/29532
> 
> Log:
> Aesthetics: Hide the tabbar when closing all windows one-by-one.
> 
> Modified:
>    lyx-devel/trunk/src/frontends/qt4/GuiView.cpp
>    lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.cpp
> 
> Modified: lyx-devel/trunk/src/frontends/qt4/GuiView.cpp
> ==============================================================================
> --- lyx-devel/trunk/src/frontends/qt4/GuiView.cpp     Mon May  4 13:50:55 
> 2009        (r29531)
> +++ lyx-devel/trunk/src/frontends/qt4/GuiView.cpp     Mon May  4 13:53:34 
> 2009        (r29532)
> @@ -538,6 +538,8 @@
>       int splitter_count = d.splitter_->count();
>       for (; splitter_count; --splitter_count) {
>               TabWorkArea * twa = d.tabWorkArea(0);
> +             twa->showBar(false);
> +             twa->updateTabTexts();


duh. this cant work. when you have ten files opened and few of them are edited, 
then
cancel of saving will let the tabbar in hidden state.

iirc the code below was somehow engaged in hiddening/showing toggle of 
fullscreen mode,
but i havent tested if something gets broken.

generally i would be more happy if you let this code as it were then fixing the 
problems above
and complicating the code. (in fact i even dont find the previous state 
disturbing...)

pavel

>                               
>               int twa_count = twa->count();
>               for (; twa_count; --twa_count) {
> 
> Modified: lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.cpp
> ==============================================================================
> --- lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.cpp Mon May  4 13:50:55 
> 2009        (r29531)
> +++ lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.cpp Mon May  4 13:53:34 
> 2009        (r29532)
> @@ -1461,7 +1461,8 @@
>                       setFullScreen(true);
>               else
>                       // Hide tabbar if there's only one tab.
> -                     showBar(count() > 1);
> +                     if (tabBar()->isVisible() && count() <= 1)
> +                             showBar(false);
>       } else {
>               lastWorkAreaRemoved();
>       }

Reply via email to