diff --git a/src/Image/IntelliRasterImage.cpp b/src/Image/IntelliRasterImage.cpp index 9626f59..59466f9 100644 --- a/src/Image/IntelliRasterImage.cpp +++ b/src/Image/IntelliRasterImage.cpp @@ -10,11 +10,11 @@ IntelliRasterImage::IntelliRasterImage(int width, int height, bool fastRendererO } -IntelliRasterImage::Copy(const IntelliRasterImage& image) - : IntelliImage(image.getWidth(), image.getHeight(), image.isFastRendering()){ +IntelliRasterImage* IntelliRasterImage::copy(const IntelliRasterImage& image){ this->TypeOfImage = ImageType::RASTERIMAGE; IntelliRasterImage* raster = new IntelliRasterImage(imageData.width(), imageData.height(), this->fastRenderering); raster->imageData.copy(0,0,image.getWidth(),image.getWidth()); + return raster; } diff --git a/src/Image/IntelliRasterImage.h b/src/Image/IntelliRasterImage.h index b6fdc07..dd65d69 100644 --- a/src/Image/IntelliRasterImage.h +++ b/src/Image/IntelliRasterImage.h @@ -26,7 +26,7 @@ public: */ IntelliRasterImage(int width, int height, bool fastRendererOn); -void copy(const IntelliRasterImage& image); +IntelliRasterImage* copy(const IntelliRasterImage& image); /*! * \brief An Destructor. diff --git a/src/Image/IntelliShapedImage.cpp b/src/Image/IntelliShapedImage.cpp index bfaa053..0202577 100644 --- a/src/Image/IntelliShapedImage.cpp +++ b/src/Image/IntelliShapedImage.cpp @@ -10,11 +10,11 @@ IntelliShapedImage::IntelliShapedImage(int width, int height, bool fastRendererO this->fastRenderering = fastRendererOn; } -IntelliShapedImage::Copy(const IntelliShapedImage& image) - : IntelliRasterImage(image.getWidth(), image.getHeight(), image.isFastRendering()){ +IntelliShapedImage* IntelliShapedImage::copy(const IntelliShapedImage& image){ this->TypeOfImage = ImageType::SHAPEDIMAGE; IntelliShapedImage* shaped = new IntelliShapedImage(imageData.width(), imageData.height(), this->fastRenderering); shaped->imageData.copy(0,0,image.getWidth(),image.getWidth()); + return shaped; } IntelliShapedImage::~IntelliShapedImage(){ diff --git a/src/Image/IntelliShapedImage.h b/src/Image/IntelliShapedImage.h index bca6061..3292211 100644 --- a/src/Image/IntelliShapedImage.h +++ b/src/Image/IntelliShapedImage.h @@ -38,7 +38,7 @@ public: */ IntelliShapedImage(int width, int height, bool fastRendererOn); -void copy(const IntelliShapedImage& image); +IntelliShapedImage* copy(const IntelliShapedImage& image); /*! * \brief An Destructor. */ diff --git a/src/Layer/PaintingArea.cpp b/src/Layer/PaintingArea.cpp index 13ceadd..36d55ab 100644 --- a/src/Layer/PaintingArea.cpp +++ b/src/Layer/PaintingArea.cpp @@ -471,7 +471,7 @@ void PaintingArea::updateTools(){ } void PaintingArea::historyadd(){ - /* +/* if (++historyPresent == 100) historyPresent = 0; historyMaxFuture = historyPresent; if (historyPresent == historyMaxPast) if (++historyMaxPast == 100) historyMaxPast = 0; @@ -480,7 +480,6 @@ void PaintingArea::historyadd(){ for (unsigned long long i=0;i < layerBundle.size();i++) { }*/ - } void PaintingArea::historyGoBack(){ diff --git a/src/main.cpp b/src/main.cpp index 9ebbca7..dc5caa5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7,11 +7,6 @@ int main(int argc, char*argv[]){ // The main application QApplication app(argc, argv); - - std::fstream file("test.txt"); - file << "Hallo welt"; - file.close(); - // Create and open the main window IntelliPhotoGui window; window.show(); diff --git a/src/main.cpp.autosave b/src/main.cpp.autosave deleted file mode 100644 index 30adab2..0000000 --- a/src/main.cpp.autosave +++ /dev/null @@ -1,15 +0,0 @@ -#include "GUI/IntelliPhotoGui.h" -#include -#include -#include - -int main(int argc, char*argv[]){ - // The main application - QApplication app(argc, argv); - - // Create and open the main window - IntelliPhotoGui window; - window.show(); - - return app.exec(); -}