Skip to content

Commit

Permalink
Enable editing of the Tags field in the Info dialog when not in the l…
Browse files Browse the repository at this point in the history
…ibrary or fileless.

Since it is now saved in the ComicInfo.xml file. Required the UpdateComicFIles be enabled in the setting.
  • Loading branch information
maforget committed Feb 26, 2024
1 parent cb25324 commit 631dbb4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ComicRack/Dialogs/ComicBookDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,19 +258,19 @@ private void SetComicToEditor(ComicBook comic)
pagesView.Book.Open(async: true, 0);
}
book?.Dispose();
bool isFilelessOrInLibrary = !comic.IsLinked || comic.IsInContainer;
bool shouldEnableTextbox = isFilelessOrInLibrary || Program.Settings.UpdateComicFiles;
bool isFilelessOrInContainer = !comic.IsLinked || comic.IsInContainer;
bool canEdit = isFilelessOrInContainer || Program.Settings.UpdateComicFiles;
bool canEditProperties = comic.EditMode.CanEditProperties();
tabDetails.Enabled = tabPlot.Enabled = tabColors.Enabled = shouldEnableTextbox && canEditProperties;
tabPages.Enabled = shouldEnableTextbox && comic.EditMode.CanEditPages();
tabCatalog.Enabled = tabCustom.Enabled = isFilelessOrInLibrary && canEditProperties;
tabDetails.Enabled = tabPlot.Enabled = tabColors.Enabled = canEdit && canEditProperties;
tabPages.Enabled = canEdit && comic.EditMode.CanEditPages();
tabCatalog.Enabled = tabCustom.Enabled = isFilelessOrInContainer && canEditProperties;
EnableTabPage(tabPages, comic.IsLinked);
EnableTabPage(tabColors, comic.IsLinked);
EnableTabPage(tabCatalog, (!comic.IsLinked || !Program.Settings.CatalogOnlyForFileless) && isFilelessOrInLibrary);
EnableTabPage(tabCustom, Program.Settings.ShowCustomBookFields && isFilelessOrInLibrary);
EnableTabPage(tabCatalog, (!comic.IsLinked || !Program.Settings.CatalogOnlyForFileless) && isFilelessOrInContainer);
EnableTabPage(tabCustom, Program.Settings.ShowCustomBookFields && isFilelessOrInContainer);
labelEnableProposed.Visible = cbEnableProposed.Visible = labelScanInformation.Visible = txScanInformation.Visible = comic.IsLinked;
labelOpenedTime.Visible = dtpOpenedTime.Visible = labelPagesAsTextSimple.Visible = txPagesAsTextSimple.Visible = !comic.IsLinked;
txCommunityRating.Enabled = txRating.Enabled = txTags.Enabled = cbEnableProposed.Enabled = cbSeriesComplete.Enabled = isFilelessOrInLibrary;
txCommunityRating.Enabled = txRating.Enabled = cbEnableProposed.Enabled = cbSeriesComplete.Enabled = isFilelessOrInContainer;
if (!canEditProperties)
{
txCommunityRating.Enabled = txRating.Enabled = false;
Expand Down

0 comments on commit 631dbb4

Please sign in to comment.