Fix update of tool locations after changing pref

Only the editor panel in single editor mode was being updated. This
commit makes them update in multiple editor mode and also updates the
batch editor.
This commit is contained in:
Lawrence Lee 2021-12-12 17:50:12 -08:00
parent d29b451aa6
commit 012103b4e2
5 changed files with 33 additions and 0 deletions

View File

@ -485,3 +485,11 @@ void EditWindow::set_title_decorated(Glib::ustring fname)
set_title("RawTherapee " + M("EDITWINDOW_TITLE") + subtitle);
}
void EditWindow::updateToolPanelToolLocations(
const std::vector<Glib::ustring> &favorites, bool cloneFavoriteTools)
{
for (const auto& panel : epanels) {
panel.second->updateToolPanelToolLocations(favorites, cloneFavoriteTools);
}
}

View File

@ -64,6 +64,8 @@ public:
bool selectEditorPanel(const std::string &name);
bool closeOpenEditors();
bool isProcessing();
void updateToolPanelToolLocations(
const std::vector<Glib::ustring> &favorites, bool cloneFavoriteTools);
void toFront();
bool keyPressed (GdkEventKey* event);

View File

@ -436,3 +436,11 @@ void FilePanel::updateTPVScrollbar (bool hide)
{
tpc->updateTPVScrollbar (hide);
}
void FilePanel::updateToolPanelToolLocations(
const std::vector<Glib::ustring> &favorites, bool cloneFavoriteTools)
{
if (tpc) {
tpc->updateToolLocations(favorites, cloneFavoriteTools);
}
}

View File

@ -83,6 +83,8 @@ public:
bool handleShortcutKey (GdkEventKey* event);
bool handleShortcutKeyRelease(GdkEventKey *event);
void updateTPVScrollbar (bool hide);
void updateToolPanelToolLocations(
const std::vector<Glib::ustring> &favorites, bool cloneFavoriteTools);
private:
void on_NB_switch_page(Gtk::Widget* page, guint page_num);

View File

@ -1113,9 +1113,22 @@ void RTWindow::updateHistogramPosition (int oldPosition, int newPosition)
void RTWindow::updateToolPanelToolLocations(
const std::vector<Glib::ustring> &favorites, bool cloneFavoriteTools)
{
if (fpanel) {
fpanel->updateToolPanelToolLocations(favorites, cloneFavoriteTools);
}
if (epanel) {
epanel->updateToolPanelToolLocations(favorites, cloneFavoriteTools);
}
for (const auto &panel : epanels) {
panel.second->updateToolPanelToolLocations(favorites, cloneFavoriteTools);
}
if (options.multiDisplayMode > 0) {
EditWindow::getInstance(this)
->updateToolPanelToolLocations(favorites, cloneFavoriteTools);
}
}
bool RTWindow::splashClosed (GdkEventAny* event)