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 () {
|
void Preferences::okPressed () {
|
||||||
|
|
||||||
storePreferences ();
|
storePreferences ();
|
||||||
options.copyFrom (&moptions);
|
|
||||||
workflowUpdate();
|
workflowUpdate();
|
||||||
|
options.copyFrom (&moptions);
|
||||||
hide ();
|
hide ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1119,10 +1119,15 @@ void Preferences::switchThemeTo(Glib::ustring newTheme) {
|
|||||||
|
|
||||||
void Preferences::workflowUpdate (){
|
void Preferences::workflowUpdate (){
|
||||||
|
|
||||||
if(moptions.tabbedUI)
|
if(moptions.tabbedUI != options.tabbedUI)
|
||||||
parent->epanel->hide_all();
|
{
|
||||||
else
|
parent->MoveFileBrowserToMain();
|
||||||
parent->epanel->show_all();
|
parent->SetMainCurrent();
|
||||||
|
if(moptions.tabbedUI)
|
||||||
|
parent->epanel->hide_all();
|
||||||
|
else
|
||||||
|
parent->epanel->show_all();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::switchFontTo(Glib::ustring newFont) {
|
void Preferences::switchFontTo(Glib::ustring newFont) {
|
||||||
|
@ -324,16 +324,33 @@ void RTWindow::SetEditorCurrent()
|
|||||||
mainNB->set_current_page (mainNB->page_num (*epanel));
|
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)
|
bool RTWindow::on_expose_event_epanel(GdkEventExpose* event)
|
||||||
{
|
{
|
||||||
|
if(!options.tabbedUI && epanel->catalogPane->get_children().size() ==0 )
|
||||||
if(!options.tabbedUI && epanel->catalogPane->get_children().size() ==0 ){
|
MoveFileBrowserToEditor();
|
||||||
FileCatalog *fCatalog = fpanel->fileCatalog;
|
|
||||||
fpanel->ribbonPane->remove(*fCatalog);
|
|
||||||
epanel->catalogPane->add(*fCatalog);
|
|
||||||
fCatalog->fileBrowser->setArrangement(ThumbBrowserBase::TB_Horizontal);
|
|
||||||
fCatalog->redrawAll();
|
|
||||||
}
|
|
||||||
return false; // Gtk::VBox::on_expose_event(event);
|
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)
|
bool RTWindow::on_expose_event_fpanel(GdkEventExpose* event)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(!options.tabbedUI && fpanel->ribbonPane->get_children().size() ==0 ){
|
if(!options.tabbedUI && fpanel->ribbonPane->get_children().size() ==0 )
|
||||||
FileCatalog *fCatalog = fpanel->fileCatalog;
|
MoveFileBrowserToMain();
|
||||||
epanel->catalogPane->remove(*fCatalog);
|
|
||||||
//dirpaned->pack2(*fileCatalog,true,true);
|
|
||||||
fpanel->ribbonPane->add(*fCatalog);
|
|
||||||
fCatalog->fileBrowser->setArrangement(ThumbBrowserBase::TB_Vertical);
|
|
||||||
fCatalog->redrawAll();
|
|
||||||
}
|
|
||||||
return false; // Gtk::HPaned::on_expose_event(event);
|
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; }
|
rtengine::ProgressListener* getProgressListener () { return pldBridge; }
|
||||||
EditorPanel* epanel;
|
EditorPanel* epanel;
|
||||||
void SetEditorCurrent();
|
void SetEditorCurrent();
|
||||||
|
void SetMainCurrent();
|
||||||
|
void MoveFileBrowserToEditor();
|
||||||
|
void MoveFileBrowserToMain();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user