mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-18 22:30:30 +02:00
ednungs check
This commit is contained in:
@@ -52,21 +52,27 @@ void IntelliPhotoGui::slotOpen(){
|
|||||||
// If we have a file name load the image and place
|
// If we have a file name load the image and place
|
||||||
// it in the paintingArea
|
// it in the paintingArea
|
||||||
if (!fileName.isEmpty()) {
|
if (!fileName.isEmpty()) {
|
||||||
if(fileName.length()>3){
|
bool rightFileType =true;
|
||||||
if(*(fileName.rend()+1)==QChar('f') &&
|
if(fileName.size()>=4){
|
||||||
*(fileName.rend()+2)==QChar('d') &&
|
QString endung(".idf");
|
||||||
*(fileName.rend()+3)==QChar('i') &&
|
int length = fileName.size();
|
||||||
*(fileName.rend()+4)==QChar('.')){
|
for(int i=0; i<4; i++){
|
||||||
qDebug() << "works.";
|
if(endung[i]!=fileName[length-4+i]){
|
||||||
IntelliDatamanager::loadProject(paintingArea,fileName);
|
rightFileType = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
if(rightFileType){
|
||||||
//paintingArea->open(fileName);
|
//paintingArea->open(fileName);
|
||||||
//TODO remove datamanager funciton and enable painting area function
|
//TODO remove datamanager funciton and enable painting area function
|
||||||
IntelliDatamanager::loadProject(paintingArea,fileName);
|
IntelliDatamanager::loadProject(paintingArea,fileName);
|
||||||
UpdateGui();
|
UpdateGui();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called when the user clicks Save As in the menu
|
// Called when the user clicks Save As in the menu
|
||||||
|
|||||||
@@ -436,6 +436,10 @@ QImage PaintingArea::getImageDataOfActiveLayer(){
|
|||||||
return returnImage;
|
return returnImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<LayerObject>* PaintingArea::getLayerBundle(){
|
||||||
|
return &layerBundle;
|
||||||
|
}
|
||||||
|
|
||||||
void PaintingArea::updateTools(){
|
void PaintingArea::updateTools(){
|
||||||
if(Tool!=nullptr) {
|
if(Tool!=nullptr) {
|
||||||
if(Tool->getIsDrawing()) {
|
if(Tool->getIsDrawing()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user