Fix a misbehavior when opening a new Editor tab (see comment 35 from issue 853)
This commit is contained in:
@@ -167,7 +167,7 @@ void ProfilePanel::storeCurrentValue () {
|
|||||||
*/
|
*/
|
||||||
void ProfilePanel::updateProfileList () {
|
void ProfilePanel::updateProfileList () {
|
||||||
|
|
||||||
changeconn.block (true);
|
bool ccPrevState = changeconn.block(true);
|
||||||
|
|
||||||
// rescan file tree
|
// rescan file tree
|
||||||
profiles->updateProfileList();
|
profiles->updateProfileList();
|
||||||
@@ -178,11 +178,11 @@ void ProfilePanel::updateProfileList () {
|
|||||||
if (lastsaved)
|
if (lastsaved)
|
||||||
addLastSavedRow();
|
addLastSavedRow();
|
||||||
|
|
||||||
changeconn.block (false);
|
changeconn.block (ccPrevState);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProfilePanel::restoreValue () {
|
void ProfilePanel::restoreValue () {
|
||||||
changeconn.block (true);
|
bool ccPrevState = changeconn.block(true);
|
||||||
|
|
||||||
if (!profiles->setActiveRowFromFullPath(storedValue) && storedPProfile) {
|
if (!profiles->setActiveRowFromFullPath(storedValue) && storedPProfile) {
|
||||||
if (custom) delete custom;
|
if (custom) delete custom;
|
||||||
@@ -196,7 +196,7 @@ void ProfilePanel::restoreValue () {
|
|||||||
|
|
||||||
currRow = profiles->get_active();
|
currRow = profiles->get_active();
|
||||||
|
|
||||||
changeconn.block (false);
|
changeconn.block (ccPrevState);
|
||||||
|
|
||||||
storedValue = "";
|
storedValue = "";
|
||||||
|
|
||||||
@@ -296,9 +296,9 @@ void ProfilePanel::save_clicked (GdkEventButton* event) {
|
|||||||
writeFailed(dialog, fname);
|
writeFailed(dialog, fname);
|
||||||
else {
|
else {
|
||||||
done=true;
|
done=true;
|
||||||
changeconn.block (true);
|
bool ccPrevState = changeconn.block(true);
|
||||||
profileStore.parseProfiles();
|
profileStore.parseProfiles();
|
||||||
changeconn.block (false);
|
changeconn.block (ccPrevState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -308,9 +308,9 @@ void ProfilePanel::save_clicked (GdkEventButton* event) {
|
|||||||
writeFailed(dialog, fname);
|
writeFailed(dialog, fname);
|
||||||
else {
|
else {
|
||||||
done=true;
|
done=true;
|
||||||
changeconn.block (true);
|
bool ccPrevState = changeconn.block(true);
|
||||||
profileStore.parseProfiles();
|
profileStore.parseProfiles();
|
||||||
changeconn.block (false);
|
changeconn.block (ccPrevState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -533,9 +533,9 @@ void ProfilePanel::selection_changed () {
|
|||||||
const ProfileStoreEntry *pse = profiles->getSelectedEntry();
|
const ProfileStoreEntry *pse = profiles->getSelectedEntry();
|
||||||
if (pse->type == PSET_FOLDER) {
|
if (pse->type == PSET_FOLDER) {
|
||||||
// this entry is invalid, restoring the old value
|
// this entry is invalid, restoring the old value
|
||||||
changeconn.block(true);
|
bool ccPrevState = changeconn.block(true);
|
||||||
profiles->set_active(currRow);
|
profiles->set_active(currRow);
|
||||||
changeconn.block(false);
|
changeconn.block(ccPrevState);
|
||||||
dontupdate = false;
|
dontupdate = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -591,7 +591,7 @@ void ProfilePanel::initProfile (const Glib::ustring& profileFullPath, ProcParams
|
|||||||
const ProfileStoreEntry *pse = NULL;
|
const ProfileStoreEntry *pse = NULL;
|
||||||
const PartialProfile *defprofile = NULL;
|
const PartialProfile *defprofile = NULL;
|
||||||
|
|
||||||
changeconn.block (true);
|
bool ccPrevState = changeconn.block(true);
|
||||||
|
|
||||||
if (custom) {
|
if (custom) {
|
||||||
custom->deleteInstance();
|
custom->deleteInstance();
|
||||||
@@ -648,7 +648,7 @@ void ProfilePanel::initProfile (const Glib::ustring& profileFullPath, ProcParams
|
|||||||
tpc->profileChange (defprofile, EvPhotoLoaded, profiles->getSelectedEntry()->label);
|
tpc->profileChange (defprofile, EvPhotoLoaded, profiles->getSelectedEntry()->label);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
changeconn.block (false);
|
changeconn.block (ccPrevState);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProfilePanel::setInitialFileName (const Glib::ustring& filename) {
|
void ProfilePanel::setInitialFileName (const Glib::ustring& filename) {
|
||||||
|
Reference in New Issue
Block a user