<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>410341</bug_id>
          
          <creation_ts>2019-07-29 08:11:22 +0000</creation_ts>
          <short_desc>Exif checkboxes ‘Fired’, ‘Function’ and ‘Red-eye remove’ all act as *one* checkbox</short_desc>
          <delta_ts>2021-08-25 01:50:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>krita</product>
          <component>General</component>
          <version>git master (please specify the git hash!)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Karl Ove Hufthammer">karl</reporter>
          <assigned_to name="amyspark">amy</assigned_to>
          <cc>amy</cc>
    
    <cc>griffinvalley</cc>
    
    <cc>tamtamy.tymona</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/krita/commit/8702bb9001eb09519e5b8f49d3634816f8db398d</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1871676</commentid>
    <comment_count>0</comment_count>
    <who name="Karl Ove Hufthammer">karl</who>
    <bug_when>2019-07-29 08:11:22 +0000</bug_when>
    <thetext>SUMMARY
Checking the ‘Fired’, ‘Function’ or ‘Red-eye remove’ checkboxes in the Exif metadata enables/disables *all* three checkboxes. That is, they basically act as *one* checkbox.


STEPS TO REPRODUCE
1. Open/create an image.
2. Go to ‘Layer → Edit metadata → Exif → Flash’
3. Click either the ‘Fired’, ‘Function’ or ‘Red-eye remove’ checkboxes.
4. Repeat step 3.

OBSERVED RESULT
The three checkboxes ‘Fired’, ‘Function’ or ‘Red-eye remove’ are all enabled/disabled when you click one of them.


EXPECTED RESULT
I’m not sure what ‘Function’ refers to, but the checkboxes should at least be *partially* independent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1882394</commentid>
    <comment_count>1</comment_count>
    <who name="Tiar">tamtamy.tymona</who>
    <bug_when>2019-09-26 18:32:09 +0000</bug_when>
    <thetext>Related: bug 396669

It looks like metadata are kind of broken anyway. I could &quot;fix this&quot; by making it behave independently, but... I can&apos;t test if it breaks anything, because most of the code in metadata is either broken or wrong.

The reason why all those checkboxes behave as one is that they are all distinguished as &quot;exif:Flash&quot; instead of &quot;exif:Flash:Fired&quot; etc. because exif:Flash, differently from all other fields in exif: scheme, is a structure (which means it contains other fields inside). The code looks like someone knew about it, but later forgot or at least forgot to check it in practice.

The second/main reason is that all updates in one widget are propagated to all other widgets using the name of the property as the only thing that differentiate between what should get the notification and what shouldn&apos;t. All checkboxes has a property called &quot;checked&quot;, which is why when one changes its &quot;checked&quot; status, they all change it too.

Looks like the main reason for all those trouble is not separating the model and the view enough.

I&apos;m gonna unassign myself now. This bug depends on untangling the metadata code and fixing other bugs. It shouldn&apos;t be very difficult, but it will take some time, especially because half of the information is in .ui files and schemes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1882398</commentid>
    <comment_count>2</comment_count>
    <who name="Tiar">tamtamy.tymona</who>
    <bug_when>2019-09-26 18:49:56 +0000</bug_when>
    <thetext>Relevant files:

plugins/extensions/metadataeditor/kis_entry_editor.cpp
plugins/extensions/metadataeditor/kis_metadata_editor.cpp
plugins/extensions/metadataeditor/editors/exif.ui
krita/data/metadata/schemas/exif.schema

The most relevant functions are void KisEntryEditor::valueChanged() and KisMetaDataEditor::KisMetaDataEditor(QWidget* parent, KisMetaData::Store* originalStore)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2053879</commentid>
    <comment_count>3</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2021-08-17 02:36:26 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1004</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2054025</commentid>
    <comment_count>4</comment_count>
    <who name="amyspark">amy</who>
    <bug_when>2021-08-17 16:38:56 +0000</bug_when>
    <thetext>Git commit db407cd7993794ebb125ae63b720e11325f7365c by L. E. Segovia.
Committed on 17/08/2021 at 16:37.
Pushed by lsegovia into branch &apos;master&apos;.

Metadata editor: reimplement entry handling

This commit implements entry handling based entirely on a few compile
time macros and Qt&apos;s newer signal/slot syntax.

This allows me to add support for flash metadata, which was
broken since at least 67b39577b6dc9e5f2e5e2885b2188cbd393c55f6.

While at it, add a default icon to the Dublin Core pane; the old one in
the xmlgui file was missing since forever.

CCMAIL: kimageshop@kde.org

M  +0    -6    Messages.sh
M  +0    -1    plugins/extensions/metadataeditor/CMakeLists.txt
M  +12   -30   plugins/extensions/metadataeditor/editors/dublincore.ui
D  +0    -33   plugins/extensions/metadataeditor/editors/dublincore.xmlgui
M  +4    -101  plugins/extensions/metadataeditor/editors/exif.ui
D  +0    -157  plugins/extensions/metadataeditor/editors/exif.xmlgui
M  +144  -99   plugins/extensions/metadataeditor/kis_meta_data_editor.cc
M  +1    -0    plugins/extensions/metadataeditor/kis_meta_data_editor.h

https://invent.kde.org/graphics/krita/commit/db407cd7993794ebb125ae63b720e11325f7365c</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2056124</commentid>
    <comment_count>5</comment_count>
    <who name="amyspark">amy</who>
    <bug_when>2021-08-25 01:50:50 +0000</bug_when>
    <thetext>Git commit 8702bb9001eb09519e5b8f49d3634816f8db398d by L. E. Segovia.
Committed on 25/08/2021 at 01:48.
Pushed by lsegovia into branch &apos;krita/5.0&apos;.

Metadata editor: reimplement entry handling

This commit implements entry handling based entirely on a few compile
time macros and Qt&apos;s newer signal/slot syntax.

This allows me to add support for flash metadata, which was
broken since at least 67b39577b6dc9e5f2e5e2885b2188cbd393c55f6.

While at it, add a default icon to the Dublin Core pane; the old one in
the xmlgui file was missing since forever.

CCMAIL: kimageshop@kde.org
(cherry picked from commit db407cd7993794ebb125ae63b720e11325f7365c)

M  +0    -6    Messages.sh
M  +0    -1    plugins/extensions/metadataeditor/CMakeLists.txt
M  +12   -30   plugins/extensions/metadataeditor/editors/dublincore.ui
D  +0    -33   plugins/extensions/metadataeditor/editors/dublincore.xmlgui
M  +4    -101  plugins/extensions/metadataeditor/editors/exif.ui
D  +0    -157  plugins/extensions/metadataeditor/editors/exif.xmlgui
M  +144  -99   plugins/extensions/metadataeditor/kis_meta_data_editor.cc
M  +1    -0    plugins/extensions/metadataeditor/kis_meta_data_editor.h

https://invent.kde.org/graphics/krita/commit/8702bb9001eb09519e5b8f49d3634816f8db398d</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>