Skip to content

Commit

Permalink
fixed bug where parent was cast to a wrong class
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Nov 16, 2023
1 parent 4bbd87c commit 84870b8
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,7 @@
import com.jdimension.jlawyer.client.editors.files.ArchiveFilePanel;
import com.jdimension.jlawyer.client.editors.files.EditArchiveFileDetailsPanel;
import com.jdimension.jlawyer.client.editors.files.ViewArchiveFileDetailsPanel;
import com.jdimension.jlawyer.client.editors.reporting.ReportingPanel;
import com.jdimension.jlawyer.client.settings.ClientSettings;
import com.jdimension.jlawyer.client.settings.UserSettings;
import com.jdimension.jlawyer.persistence.ArchiveFileBean;
Expand Down Expand Up @@ -795,8 +796,8 @@ private void lblArchiveFileMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FI
} else {
editor = EditorsRegistry.getInstance().getEditor(ViewArchiveFileDetailsPanel.class.getName());
}
Object historyeditor = EditorsRegistry.getInstance().getCurrentEditor();
Image bgi=((HistoryPanel)historyeditor).getBackgroundImage();
Object reportingeditor = EditorsRegistry.getInstance().getCurrentEditor();
Image bgi=((ReportingPanel)reportingeditor).getBackgroundImage();

if (editor instanceof ThemeableEditor) {
// inherit the background to newly created child editors
Expand All @@ -823,7 +824,7 @@ private void lblArchiveFileMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FI
}

((ArchiveFilePanel) editor).setArchiveFileDTO(aFile);
((ArchiveFilePanel) editor).setOpenedFromEditorClass(historyeditor.getClass().getName());
((ArchiveFilePanel) editor).setOpenedFromEditorClass(reportingeditor.getClass().getName());
EditorsRegistry.getInstance().setMainEditorsPaneView((Component) editor);
} catch (Exception ex) {
log.error("Error creating editor from class " + this.getClass().getName(), ex);
Expand Down

0 comments on commit 84870b8

Please sign in to comment.