Synchronize send to external editor buttons
Keep all buttons updated when using a multiple editor tabs mode.
This commit is contained in:
@@ -2003,6 +2003,9 @@ void EditorPanel::sendToExternalChanged(int)
|
||||
index = -1;
|
||||
}
|
||||
options.externalEditorIndex = index;
|
||||
if (externalEditorChangedSignal) {
|
||||
externalEditorChangedSignal->emit();
|
||||
}
|
||||
}
|
||||
|
||||
void EditorPanel::sendToExternalPressed()
|
||||
@@ -2069,6 +2072,23 @@ void EditorPanel::syncFileBrowser() // synchronize filebrowser with image in E
|
||||
}
|
||||
}
|
||||
|
||||
ExternalEditorChangedSignal * EditorPanel::getExternalEditorChangedSignal()
|
||||
{
|
||||
return externalEditorChangedSignal;
|
||||
}
|
||||
|
||||
void EditorPanel::setExternalEditorChangedSignal(ExternalEditorChangedSignal *signal)
|
||||
{
|
||||
if (externalEditorChangedSignal) {
|
||||
externalEditorChangedSignalConnection.disconnect();
|
||||
}
|
||||
externalEditorChangedSignal = signal;
|
||||
if (signal) {
|
||||
externalEditorChangedSignalConnection = signal->connect(
|
||||
sigc::mem_fun(*this, &EditorPanel::updateExternalEditorSelection));
|
||||
}
|
||||
}
|
||||
|
||||
void EditorPanel::histogramProfile_toggled()
|
||||
{
|
||||
options.rtSettings.HistogramWorking = toggleHistogramProfile->get_active();
|
||||
@@ -2203,6 +2223,18 @@ void EditorPanel::onAppChooserDialogResponse(int responseId)
|
||||
}
|
||||
}
|
||||
|
||||
void EditorPanel::updateExternalEditorSelection()
|
||||
{
|
||||
int index = send_to_external->getSelected();
|
||||
if (index >= 0 && static_cast<unsigned>(index) == options.externalEditors.size()) {
|
||||
index = -1;
|
||||
}
|
||||
if (options.externalEditorIndex != index) {
|
||||
send_to_external->setSelected(
|
||||
options.externalEditorIndex >= 0 ? options.externalEditorIndex : options.externalEditors.size());
|
||||
}
|
||||
}
|
||||
|
||||
void EditorPanel::historyBeforeLineChanged (const rtengine::procparams::ProcParams& params)
|
||||
{
|
||||
|
||||
|
Reference in New Issue
Block a user