fix thumb browser disappearance if a user changes editor layout to multi tab when on the editor
This commit is contained in:
parent
04fcdd40a0
commit
67c85377e3
@ -1017,8 +1017,8 @@ void Preferences::savePressed () {
|
||||
void Preferences::okPressed () {
|
||||
|
||||
storePreferences ();
|
||||
options.copyFrom (&moptions);
|
||||
workflowUpdate();
|
||||
options.copyFrom (&moptions);
|
||||
hide ();
|
||||
}
|
||||
|
||||
@ -1119,10 +1119,15 @@ void Preferences::switchThemeTo(Glib::ustring newTheme) {
|
||||
|
||||
void Preferences::workflowUpdate (){
|
||||
|
||||
if(moptions.tabbedUI)
|
||||
parent->epanel->hide_all();
|
||||
else
|
||||
parent->epanel->show_all();
|
||||
if(moptions.tabbedUI != options.tabbedUI)
|
||||
{
|
||||
parent->MoveFileBrowserToMain();
|
||||
parent->SetMainCurrent();
|
||||
if(moptions.tabbedUI)
|
||||
parent->epanel->hide_all();
|
||||
else
|
||||
parent->epanel->show_all();
|
||||
}
|
||||
}
|
||||
|
||||
void Preferences::switchFontTo(Glib::ustring newFont) {
|
||||
|
@ -324,16 +324,33 @@ void RTWindow::SetEditorCurrent()
|
||||
mainNB->set_current_page (mainNB->page_num (*epanel));
|
||||
}
|
||||
|
||||
void RTWindow::SetMainCurrent()
|
||||
{
|
||||
mainNB->set_current_page (mainNB->page_num (*fpanel));
|
||||
}
|
||||
|
||||
void RTWindow::MoveFileBrowserToMain()
|
||||
{
|
||||
FileCatalog *fCatalog = fpanel->fileCatalog;
|
||||
epanel->catalogPane->remove(*fCatalog);
|
||||
fpanel->ribbonPane->add(*fCatalog);
|
||||
fCatalog->fileBrowser->setArrangement(ThumbBrowserBase::TB_Vertical);
|
||||
fCatalog->redrawAll();
|
||||
}
|
||||
|
||||
void RTWindow::MoveFileBrowserToEditor()
|
||||
{
|
||||
FileCatalog *fCatalog = fpanel->fileCatalog;
|
||||
fpanel->ribbonPane->remove(*fCatalog);
|
||||
epanel->catalogPane->add(*fCatalog);
|
||||
fCatalog->fileBrowser->setArrangement(ThumbBrowserBase::TB_Horizontal);
|
||||
fCatalog->redrawAll();
|
||||
}
|
||||
|
||||
bool RTWindow::on_expose_event_epanel(GdkEventExpose* event)
|
||||
{
|
||||
|
||||
if(!options.tabbedUI && epanel->catalogPane->get_children().size() ==0 ){
|
||||
FileCatalog *fCatalog = fpanel->fileCatalog;
|
||||
fpanel->ribbonPane->remove(*fCatalog);
|
||||
epanel->catalogPane->add(*fCatalog);
|
||||
fCatalog->fileBrowser->setArrangement(ThumbBrowserBase::TB_Horizontal);
|
||||
fCatalog->redrawAll();
|
||||
}
|
||||
if(!options.tabbedUI && epanel->catalogPane->get_children().size() ==0 )
|
||||
MoveFileBrowserToEditor();
|
||||
return false; // Gtk::VBox::on_expose_event(event);
|
||||
}
|
||||
|
||||
@ -341,13 +358,7 @@ bool RTWindow::on_expose_event_epanel(GdkEventExpose* event)
|
||||
bool RTWindow::on_expose_event_fpanel(GdkEventExpose* event)
|
||||
{
|
||||
|
||||
if(!options.tabbedUI && fpanel->ribbonPane->get_children().size() ==0 ){
|
||||
FileCatalog *fCatalog = fpanel->fileCatalog;
|
||||
epanel->catalogPane->remove(*fCatalog);
|
||||
//dirpaned->pack2(*fileCatalog,true,true);
|
||||
fpanel->ribbonPane->add(*fCatalog);
|
||||
fCatalog->fileBrowser->setArrangement(ThumbBrowserBase::TB_Vertical);
|
||||
fCatalog->redrawAll();
|
||||
}
|
||||
if(!options.tabbedUI && fpanel->ribbonPane->get_children().size() ==0 )
|
||||
MoveFileBrowserToMain();
|
||||
return false; // Gtk::HPaned::on_expose_event(event);
|
||||
}
|
@ -67,6 +67,9 @@ class RTWindow : public Gtk::Window, public rtengine::ProgressListener{
|
||||
rtengine::ProgressListener* getProgressListener () { return pldBridge; }
|
||||
EditorPanel* epanel;
|
||||
void SetEditorCurrent();
|
||||
void SetMainCurrent();
|
||||
void MoveFileBrowserToEditor();
|
||||
void MoveFileBrowserToMain();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user