Skip to content

Commit

Permalink
Small fixes (labels, crop image selection etc.)
Browse files Browse the repository at this point in the history
  • Loading branch information
ponchio committed Nov 19, 2024
1 parent c843e71 commit 7868956
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
8 changes: 7 additions & 1 deletion relightlab/cropframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,14 @@ void CropFrame::clear() {

void CropFrame::init() {
Project &project = qRelightApp->project();

QString filename = project.images[0].filename;
int count = 0;
while(project.images[count].skip == true) {
count++;
if(count >= project.images.size())
break;
filename = project.images[count].filename;
}

QImage img(project.dir.filePath(filename));
if(img.isNull()) {
Expand Down
6 changes: 5 additions & 1 deletion relightlab/domepanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ void DomePanel::exportDome() {

void DomePanel::loadLP(QString path) {
std::vector<QString> filenames;
dome = Dome();
dome.lightConfiguration = Dome::DIRECTIONAL;

try {
Expand All @@ -127,12 +126,14 @@ void DomePanel::loadLP(QString path) {
QFileInfo info(path);
dome.label = info.filePath();
qRelightApp->addDome(path);

updateDomeList();

emit accept(dome);
}

void DomePanel::loadDome(QString path) {
float imageWidth = dome.imageWidth;
try {
dome.load(path);
} catch (QString error) {
Expand All @@ -143,6 +144,9 @@ void DomePanel::loadDome(QString path) {
QFileInfo info(path);
dome.label = info.filePath();
qRelightApp->addDome(path);
//preserve image width if we actually have a measurement.
if(imageWidth != 0 && qRelightApp->project().measures.size() != 0)
dome.imageWidth = imageWidth;
updateDomeList();
emit accept(dome);
}
Expand Down
1 change: 1 addition & 0 deletions relightlab/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* cancel button on sphere reflection processing.
* better info on queue items.
* if scale exists don't overwrite imageWith with dome scale.
* remove relight_vector and jus use eigen.

## Long term new features

Expand Down
2 changes: 1 addition & 1 deletion relightlab/scaleframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ScaleFrame::ScaleFrame(QWidget *parent): QFrame(parent) {
scale = new QDoubleSpinBox;
controls->addWidget(scale);

pixelSize = new QLabel;
pixelSize = new QLabel("mm");
controls->addWidget(pixelSize);

QPushButton *remove = new QPushButton(QIcon::fromTheme("trash-2"), "");
Expand Down

0 comments on commit 7868956

Please sign in to comment.