Skip to content
This repository was archived by the owner on Jun 22, 2025. It is now read-only.

Conversation

darvil82
Copy link
Member

@darvil82 darvil82 commented Aug 3, 2022

  • Made some small tweaks around.
  • Started adding the file import dialog. (wip)

Copy link
Member

@JJL772 JJL772 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff! Needs a few changes small though

@darvil82
Copy link
Member Author

darvil82 commented Aug 4, 2022

Currently crashing when importing a file if no file was opened before. Investigating.

@darvil82
Copy link
Member Author

darvil82 commented Aug 4, 2022

Found crash point:

// Select the correct image format
for (int i = 0; i < util::ArraySize(IMAGE_FORMATS); ++i) {
	if (IMAGE_FORMATS[i].format == file->GetFormat()) {
		// FIXME: IT CRASHES HERE
		formatCombo_->setCurrentIndex(i);
		break;
	}
}

At line 520, the program segfaults. Note that this only happens if the first thing done by the user is import the file.

Copy link
Member

@JJL772 JJL772 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good now, thanks for the help!

In the future, let's try to use rebase for PRs though. Makes it much easier to review in GitHub since it helps keep your changes separate from ones on the main branch. Let me know if you need a walk-through on rebasing!

@darvil82
Copy link
Member Author

darvil82 commented Aug 5, 2022

Definitely, next time I'll use rebase. Thank you very much <3

@JJL772 JJL772 merged commit 2d36123 into main Aug 5, 2022
@JJL772 JJL772 deleted the feature/import-files branch April 4, 2023 01:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants