diff --git a/studio/README.txt b/studio/README.txt index 23e7829..bc8133b 100644 --- a/studio/README.txt +++ b/studio/README.txt @@ -1,4 +1,4 @@ -Current version is v0.8.240210 +Current version is v0.8.240224 Kage Studio is a simple, Free and Open Source 2D Animation Software written by Mj Mendoza IV diff --git a/studio/installers/debian/kagestudio/DEBIAN/control b/studio/installers/debian/kagestudio/DEBIAN/control index dbe023a..270145e 100644 --- a/studio/installers/debian/kagestudio/DEBIAN/control +++ b/studio/installers/debian/kagestudio/DEBIAN/control @@ -1,5 +1,5 @@ Package: kagestudio -Version: 0.8-240210 +Version: 0.8-240224 Architecture: amd64 Maintainer: Mj Mendoza IV Depends: libcairomm-1.0-1v5,libgtkmm-3.0-1v5, libgdk-pixbuf2.0-0, ffmpeg diff --git a/studio/installers/debian/makedeb b/studio/installers/debian/makedeb index d10b642..677bd3f 100644 --- a/studio/installers/debian/makedeb +++ b/studio/installers/debian/makedeb @@ -1,7 +1,7 @@ #!/bin/sh cp ../../kagestudio ./kagestudio/usr/bin/kagestudio -cp ../../LICENSE.txt ./kagestudio/usr/share/doc/copyright -cp ../../README.txt ./kagestudio/usr/share/doc/README +cp ../../LICENSE.txt ./kagestudio/usr/share/doc/kagestudio/copyright +cp ../../README.txt ./kagestudio/usr/share/doc/kagestudio/README sudo chmod 777 kagestudio*.deb sudo rm kagestudio*amd64.deb sudo chmod 775 ./kagestudio/DEBIAN/post* diff --git a/studio/installers/windows/ffmpeg.exe b/studio/installers/windows/ffmpeg.exe index 9be9870..3765f0f 100644 Binary files a/studio/installers/windows/ffmpeg.exe and b/studio/installers/windows/ffmpeg.exe differ diff --git a/studio/installers/windows/kage_installer_info.nsh b/studio/installers/windows/kage_installer_info.nsh index 4ec4323..4b2d2bf 100644 --- a/studio/installers/windows/kage_installer_info.nsh +++ b/studio/installers/windows/kage_installer_info.nsh @@ -1,5 +1,5 @@ !define PRODUCT_NAME "Kage Studio" -!define PRODUCT_VERSION "0.8.240210" +!define PRODUCT_VERSION "0.8.240224" !define PRODUCT_PUBLISHER "Mj Mendoza IV" !define PRODUCT_WEB_SITE "https://kage.sourceforge.io" !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\kagestudio.exe" diff --git a/studio/kage.cpp b/studio/kage.cpp index a6d2eb7..26dc243 100644 --- a/studio/kage.cpp +++ b/studio/kage.cpp @@ -1255,6 +1255,11 @@ void Kage::Copy_onClick() { if (g_copiedData.size() > 0) { //if ( _stage.copySelectedShapes() == true) { //forceRenderFrames(); //why re-render the frames? + updateStatus("Selection copied"); + } else { + std::ostringstream tmpStringStream; + tmpStringStream << _stage.selectedShapes.size(); + updateStatus("Copy failed; Selected " + tmpStringStream.str()); } } catch (std::exception& e) { std::cout << "Kage::Copy_onClick Exception : " << e.what() << std::endl; @@ -1268,6 +1273,8 @@ void Kage::Paste_onClick() { if (g_selectedItems.size() > 0) { forceRenderFrames(); stackDo(); + } else { + updateStatus("Paste failed; Copy-buffer is empty"); } } catch (std::exception& e) { std::cout << "Kage::Paste_onClick Exception : " << e.what() << std::endl; @@ -1538,6 +1545,7 @@ void Kage::Delete_onClick() { if (KageStage::toolMode == KageStage::MODE_SELECT) { Kage::timestamp_IN(); std::cout << " Kage::Delete_onClick SHAPE" << std::endl; try { + stackDo(); //store current scene/layer/frame before deletion if (_document.getScene()->getLayer()->getFrame()->deleteSelectedShapes(_stage.selectedShapes) == true) { forceRenderFrames(); stackDo(); @@ -1754,6 +1762,11 @@ void Kage::CopyFrame_onClick() { unsigned int l_sceneIndex = _document.getCurrentScene()-1; unsigned int l_layerBufferCount = 0; unsigned int l_frameBufferCount = 0; + + unsigned int l_sceneBufferIndex = _documentCopyBuffer.getCurrentScene()-1; + unsigned int l_layerBufferIndex = 0; + unsigned int l_frameBufferIndex = 0; + //count all selected frames/layers for (unsigned int l_layerIndex = 0; l_layerIndex < _document.Scenes[l_sceneIndex]->Layers.size(); ++l_layerIndex) { for (unsigned int l_frameIndex = 0; l_frameIndex < _document.Scenes[l_sceneIndex]->Layers[l_layerIndex]->Frames.size(); ++l_frameIndex) { @@ -1770,18 +1783,16 @@ void Kage::CopyFrame_onClick() { l_frameBufferCount = l_frameBufferCount / l_layerBufferCount; //resize copybuffer for (unsigned int l_layerIndex = 0; l_layerIndex < l_layerBufferCount; ++l_layerIndex) { - if (_documentCopyBuffer.Scenes[l_sceneIndex]->Layers.size() < l_layerIndex+1) { - _documentCopyBuffer.Scenes[l_sceneIndex]->addLayer(); + if (_documentCopyBuffer.Scenes[l_sceneBufferIndex]->Layers.size() < l_layerIndex+1) { + _documentCopyBuffer.Scenes[l_sceneBufferIndex]->addLayer(); } for (unsigned int l_frameIndex = 0; l_frameIndex < l_frameBufferCount; ++l_frameIndex) { - if (_documentCopyBuffer.Scenes[l_sceneIndex]->Layers[l_layerIndex]->Frames.size() < l_frameIndex+1) { - _documentCopyBuffer.Scenes[l_sceneIndex]->Layers[l_layerIndex]->addFrame(); + if (_documentCopyBuffer.Scenes[l_sceneBufferIndex]->Layers[l_layerIndex]->Frames.size() < l_frameIndex+1) { + _documentCopyBuffer.Scenes[l_sceneBufferIndex]->Layers[l_layerIndex]->addFrame(); } } } - unsigned int l_sceneBufferIndex = 0; - unsigned int l_layerBufferIndex = 0; - unsigned int l_frameBufferIndex = 0; + //copy selected frame/layer for (unsigned int l_layerIndex = 0; l_layerIndex < _document.Scenes[l_sceneIndex]->Layers.size(); ++l_layerIndex) { for (unsigned int l_frameIndex = 0; l_frameIndex < _document.Scenes[l_sceneIndex]->Layers[l_layerIndex]->Frames.size(); ++l_frameIndex) { @@ -1825,7 +1836,7 @@ void Kage::CopyFrame_onClick() { void Kage::PasteFrame_onClick() { bool l_existingLayerBufferUsed = false; //for (unsigned int l_sceneIndex = 0; l_sceneIndex < _document.Scenes.size(); ++l_sceneIndex) { - int l_sceneIndex = _document.getCurrentScene()-1; + int l_sceneIndex = 0;//_document.getCurrentScene()-1; int l_currentLayerIndex = getDocumentSceneCurrentLayer() - _documentCopyBuffer.Scenes[l_sceneIndex]->Layers.size(); int l_currentFrameIndex = getDocumentSceneLayerCurrentFrame()-1; @@ -3726,21 +3737,21 @@ void Kage::doSaveProject(std::string p_filename) { "fps=\"" + StringHelper::integerToString(_document._fps) + "\" " + "assets=\"" + StringHelper::unsignedIntegerToString(l_assetMax) + "\" " + "scenes=\"" + StringHelper::unsignedIntegerToString(l_sceneMax) + "\" />"); + + //get parent + std::string l_ksfPath = l_projectFileName.parent_path().u8string(); + if (l_filename == p_filename) { + //keep l_kslPath + } else { + l_ksfPath = l_filename; + } - saveKageStudio(p_filename, _assetManager.saveAssetsTo(l_filename + l_directory)); - + saveKageStudio(p_filename, _assetManager.saveAssetsTo(l_ksfPath + l_directory)); + l_currentScene = _document.getCurrentScene(); std::string l_sceneName; bool l_saved = false; - //get parent - std::string l_ksfPath = l_projectFileName.parent_path().u8string(); - if (l_filename == p_filename) { - //keep l_kslPath - } else { - l_ksfPath = l_filename; - } - try { for (i = 1; i <= l_sceneMax; ++i) { _document.setCurrentScene(i); @@ -4922,4 +4933,4 @@ Gdk::Color Kage::getStageBG() { l_c.set_blue((gushort)_document._backgroundColor.getB() * 255); return l_c; -} +} \ No newline at end of file diff --git a/studio/kage.h b/studio/kage.h index b43d585..7601d2e 100644 --- a/studio/kage.h +++ b/studio/kage.h @@ -127,8 +127,9 @@ void ToggleOnion_onClick(); void ToolButtons_onClick(Gtk::ToggleButton *p_sourceButton); void onActionActivate(); - //void Undo_onClick(); - //void Redo_onClick(); + public: + void Undo_onClick(); + void Redo_onClick(); void Cut_onClick(); void Copy_onClick(); void Paste_onClick(); @@ -136,6 +137,7 @@ void Duplicate_onClick(); void SelectAll_onClick(); void Deselect_onClick(); + protected: void ToggleTimeline_onClick(); void ToggleProperties_onClick(); void TogglePropertiesFill_onClick(); @@ -433,8 +435,6 @@ PropertyFrameTween m_propFrameTween; KageLibrary _library; Gdk::Color m_Color; //fill or stroke? - void Undo_onClick(); - void Redo_onClick(); void Stop_onClick(); bool _isPlaying; diff --git a/studio/kage/data/frame.cpp b/studio/kage/data/frame.cpp index fe44e30..c28ac29 100644 --- a/studio/kage/data/frame.cpp +++ b/studio/kage/data/frame.cpp @@ -284,13 +284,31 @@ void KageFrame::addDataToFrame(VectorDataManager v) { } std::vector KageFrame::copySelectedShapes(std::vector p_selectedShapes) { - return vectorsData.copySelectedShapes(p_selectedShapes); + if ( _extension == KageFrame::extension::EXTENSION_NOT + || _extension == KageFrame::extension::EXTENSION_START) { + return vectorsData.copySelectedShapes(p_selectedShapes); + } else { + VectorDataManager l_vectorData = _layer->getPreviousFrameData(frameID); + return l_vectorData.copySelectedShapes(p_selectedShapes); + } } std::vector KageFrame::pasteSelectedShapes(std::vector p_copiedShapes) { - return vectorsData.pasteSelectedShapes(p_copiedShapes); + if ( _extension == KageFrame::extension::EXTENSION_NOT + || _extension == KageFrame::extension::EXTENSION_START) { + return vectorsData.pasteSelectedShapes(p_copiedShapes); + } else { + VectorDataManager l_vectorData = _layer->getPreviousFrameData(frameID); + return l_vectorData.pasteSelectedShapes(p_copiedShapes); + } } bool KageFrame::deleteSelectedShapes(std::vector p_selectedShapes) { - return vectorsData.deleteSelectedShapes(p_selectedShapes); + if ( _extension == KageFrame::extension::EXTENSION_NOT + || _extension == KageFrame::extension::EXTENSION_START) { + return vectorsData.deleteSelectedShapes(p_selectedShapes); + } else { + VectorDataManager l_vectorData = _layer->getPreviousFrameData(frameID); + return l_vectorData.deleteSelectedShapes(p_selectedShapes); + } } \ No newline at end of file diff --git a/studio/kage/data/layer.cpp b/studio/kage/data/layer.cpp index 4997893..0712202 100644 --- a/studio/kage/data/layer.cpp +++ b/studio/kage/data/layer.cpp @@ -557,6 +557,7 @@ KageFrame *KageLayer::getFrame() { } else { for (unsigned int i = 0; i < Frames.size(); ++i) { if (Frames[i]->frameID == _currentFrameID) { + _currentFrameIndex = i; return Frames[i]; } } diff --git a/studio/kage/data/scene.cpp b/studio/kage/data/scene.cpp index ae15f58..ee3343e 100644 --- a/studio/kage/data/scene.cpp +++ b/studio/kage/data/scene.cpp @@ -245,8 +245,8 @@ unsigned int KageScene::getCurrentLayer() { for (unsigned int i = 0; i < Layers.size(); ++i) { if (Layers[i]->getID() == _activeLayerID) { _activeLayerIndex = i; - _activeLayer = i+1; - return i+1; //temporarily add +1 as we integrate code to previous implementation + _activeLayer = i+1; //temporarily add +1 as we integrate code to previous implementation + return _activeLayer; } } } @@ -531,6 +531,7 @@ bool KageScene::moveToBottom() { } std::vector KageScene::raiseSelectedShape(std::vector p_selectedShapes) { + return getLayer()->raiseSelectedShape(p_selectedShapes);/* unsigned int l_currentLayer = getCurrentLayer(); if (l_currentLayer < 1 || l_currentLayer > Layers.size()) { // @@ -539,9 +540,10 @@ std::vector KageScene::raiseSelectedShape(std::vectorraiseSelectedShape(p_selectedShapes); } std::vector l_nullReturn; - return l_nullReturn; + return l_nullReturn;*/ } std::vector KageScene::lowerSelectedShape(std::vector p_selectedShapes) { + return getLayer()->lowerSelectedShape(p_selectedShapes);/* unsigned int l_currentLayer = getCurrentLayer(); if (l_currentLayer < 1 || l_currentLayer > Layers.size()) { // @@ -550,9 +552,10 @@ std::vector KageScene::lowerSelectedShape(std::vectorlowerSelectedShape(p_selectedShapes); } std::vector l_nullReturn; - return l_nullReturn; + return l_nullReturn;*/ } std::vector KageScene::raiseToTopSelectedShape(std::vector p_selectedShapes) { + return getLayer()->raiseToTopSelectedShape(p_selectedShapes);/* unsigned int l_currentLayer = getCurrentLayer(); if (l_currentLayer < 1 || l_currentLayer > Layers.size()) { // @@ -561,9 +564,10 @@ std::vector KageScene::raiseToTopSelectedShape(std::vectorraiseToTopSelectedShape(p_selectedShapes); } std::vector l_nullReturn; - return l_nullReturn; + return l_nullReturn;*/ } std::vector KageScene::lowerToBottomSelectedShape(std::vector p_selectedShapes) { + return getLayer()->lowerToBottomSelectedShape(p_selectedShapes);/* unsigned int l_currentLayer = getCurrentLayer(); if (l_currentLayer < 1 || l_currentLayer > Layers.size()) { // @@ -572,10 +576,11 @@ std::vector KageScene::lowerToBottomSelectedShape(std::vectorlowerToBottomSelectedShape(p_selectedShapes); } std::vector l_nullReturn; - return l_nullReturn; + return l_nullReturn;*/ } std::vector KageScene::groupSelectedShapes(std::vector p_selectedShapes) { + return getLayer()->groupSelectedShapes(p_selectedShapes);/* unsigned int l_currentLayer = getCurrentLayer(); if (l_currentLayer < 1 || l_currentLayer > Layers.size()) { // @@ -584,9 +589,10 @@ std::vector KageScene::groupSelectedShapes(std::vectorgroupSelectedShapes(p_selectedShapes); } std::vector l_nullReturn; - return l_nullReturn; + return l_nullReturn;*/ } std::vector KageScene::ungroupSelectedShapes(std::vector p_selectedShapes) { + return getLayer()->ungroupSelectedShapes(p_selectedShapes);/* unsigned int l_currentLayer = getCurrentLayer(); if (l_currentLayer < 1 || l_currentLayer > Layers.size()) { // @@ -595,10 +601,11 @@ std::vector KageScene::ungroupSelectedShapes(std::vectorungroupSelectedShapes(p_selectedShapes); } std::vector l_nullReturn; - return l_nullReturn; + return l_nullReturn;*/ } std::vector KageScene::duplicateShapes(std::vector p_selectedShapes) { + return getLayer()->duplicateShapes(p_selectedShapes);/* unsigned int l_currentLayer = getCurrentLayer(); if (l_currentLayer < 1 || l_currentLayer > Layers.size()) { // @@ -607,10 +614,11 @@ std::vector KageScene::duplicateShapes(std::vector p return Layers[l_currentLayer]->duplicateShapes(p_selectedShapes); } std::vector l_nullReturn; - return l_nullReturn; + return l_nullReturn;*/ } bool KageScene::flipHorizontalSelectedShape(std::vector p_selectedShapes) { + return getLayer()->flipHorizontalSelectedShape(p_selectedShapes);/* unsigned int l_currentLayer = getCurrentLayer(); if (l_currentLayer < 1 || l_currentLayer > Layers.size()) { // @@ -619,9 +627,10 @@ bool KageScene::flipHorizontalSelectedShape(std::vector p_selected return Layers[l_currentLayer]->flipHorizontalSelectedShape(p_selectedShapes); } - return false; + return false;*/ } bool KageScene::flipVerticalSelectedShape(std::vector p_selectedShapes) { + return getLayer()->flipVerticalSelectedShape(p_selectedShapes);/* unsigned int l_currentLayer = getCurrentLayer(); if (l_currentLayer < 1 || l_currentLayer > Layers.size()) { // @@ -630,10 +639,11 @@ bool KageScene::flipVerticalSelectedShape(std::vector p_selectedSh return Layers[l_currentLayer]->flipVerticalSelectedShape(p_selectedShapes); } - return false; + return false;*/ } bool KageScene::recenterRotationPoint(std::vector p_selectedShapes) { + return getLayer()->recenterRotationPoint(p_selectedShapes);/* unsigned int l_currentLayer = getCurrentLayer(); if (l_currentLayer < 1 || l_currentLayer > Layers.size()) { // @@ -642,10 +652,11 @@ bool KageScene::recenterRotationPoint(std::vector p_selectedShapes return Layers[l_currentLayer]->recenterRotationPoint(p_selectedShapes); } - return false; + return false;*/ } bool KageScene::addDataToFrame(VectorDataManager p_vectorsData) { + return getLayer()->addDataToFrame(p_vectorsData);/* unsigned int l_currentLayer = getCurrentLayer(); if (l_currentLayer < 1 || l_currentLayer > Layers.size()) { // @@ -653,10 +664,11 @@ bool KageScene::addDataToFrame(VectorDataManager p_vectorsData) { --l_currentLayer; //layer now becomes Layer Index return Layers[l_currentLayer]->addDataToFrame(p_vectorsData); } - return false; + return false;*/ } bool KageScene::setFrameData(VectorDataManager p_vectorsData) { + return getLayer()->setFrameData(p_vectorsData);/* unsigned int l_currentLayer = getCurrentLayer(); if (l_currentLayer < 1 || l_currentLayer > Layers.size()) { // @@ -664,9 +676,10 @@ bool KageScene::setFrameData(VectorDataManager p_vectorsData) { --l_currentLayer; //layer now becomes Layer Index return Layers[l_currentLayer]->setFrameData(p_vectorsData); } - return false; + return false;*/ } VectorDataManager KageScene::getFrameData() { + return getLayer()->getFrameData();/* unsigned int l_currentLayer = getCurrentLayer(); if (l_currentLayer < 1 || l_currentLayer > Layers.size()) { // @@ -675,57 +688,22 @@ VectorDataManager KageScene::getFrameData() { return Layers[l_currentLayer]->getFrameData(); } VectorDataManager l_nullReturn; - return l_nullReturn; + return l_nullReturn;*/ } VectorDataManager KageScene::getFrameDataAt(unsigned int p_frame, bool p_frameOnion, bool p_layerOnion) { - unsigned int l_currentLayer = getCurrentLayer(); - if (l_currentLayer < 1 || l_currentLayer > Layers.size()) { - // - } else { - --l_currentLayer; //layer now becomes Layer Index - return Layers[l_currentLayer]->getFrameDataAt(p_frame, p_frameOnion, p_layerOnion); - } - VectorDataManager l_nullReturn; - return l_nullReturn; + return getLayer()->getFrameDataAt(p_frame, p_frameOnion, p_layerOnion); } bool KageScene::forceSetTween(unsigned int p_tween) { -// std::cout << " KageScene::forceSetTween() " << p_tween << std::endl; - unsigned int l_currentLayer = getCurrentLayer(); - if (l_currentLayer < 1 || l_currentLayer > Layers.size()) { - // - } else { - --l_currentLayer; //layer now becomes Layer Index - return Layers[l_currentLayer]->forceSetTween(p_tween); - } - - return false; + return getLayer()->forceSetTween(p_tween); } bool KageScene::setTween(unsigned int p_tween) { - std::cout << " KageScene::setTween() " << p_tween << std::endl; - unsigned int l_currentLayer = getCurrentLayer(); - if (l_currentLayer < 1 || l_currentLayer > Layers.size()) { - // - } else { - --l_currentLayer; //layer now becomes Layer Index - return Layers[l_currentLayer]->setTween(p_tween); - } - - return false; + return getLayer()->setTween(p_tween); } unsigned int KageScene::getTween() { - unsigned int l_currentLayer = getCurrentLayer(); - if (l_currentLayer < 1 || l_currentLayer > Layers.size()) { - // - } else { - --l_currentLayer; //layer now becomes Layer Index - unsigned int l_ret = Layers[l_currentLayer]->getTween(); - return l_ret; - } - - return 0; + return getLayer()->getTween(); } bool KageScene::layerSwitchToPreviousFrame() { diff --git a/studio/kage/library/assetmanager.cpp b/studio/kage/library/assetmanager.cpp index 9e2c6cd..6692d2b 100644 --- a/studio/kage/library/assetmanager.cpp +++ b/studio/kage/library/assetmanager.cpp @@ -87,10 +87,10 @@ unsigned int KageAssetManager::addAsset(std::string p_name) { std::filesystem::path l_assetFile = std::filesystem::temp_directory_path() / _KageStudioAsset / l_hash; if (std::filesystem::exists(l_assetFile) == true) { //delete l_assetFile - const char* filename = l_assetFile.u8string().c_str(); +// const char* filename = l_assetFile.u8string().c_str(); - //if (std::filesystem::remove_all(l_assetFile) == false) { //it's not deleting somehow - if (std::remove(filename) != 0) { + if (std::filesystem::remove_all(l_assetFile) == false) { //it's not deleting somehow +// if (std::remove(filename) != 0) { std::perror("Error deleting file"); return UINT_MAX; } else { @@ -703,13 +703,13 @@ std::string KageAssetManager::getImagePathByID(unsigned int p_index) { std::cout << " ? " << l_tempPath << _KageStudioAsset << "\\" << assets[p_index]->getAssetHash() << std::endl; if (p_index < assetCount() && assets[p_index]->getAssetHash() != "") { #ifdef __linux__ - return _KageStudioAsset + "/" + assets[p_index]->getAssetHash(); + return l_tempPath + _KageStudioAsset + "/" + assets[p_index]->getAssetHash(); #elif _WIN32 return l_tempPath + _KageStudioAsset + "\\" + assets[p_index]->getAssetHash(); #elif __APPLE__ #include #if TARGET_OS_MAC - return _KageStudioAsset + "/" + assets[p_index]->getAssetHash(); + return l_tempPath + _KageStudioAsset + "/" + assets[p_index]->getAssetHash(); #endif #endif } else { diff --git a/studio/kage/stage/stage.cpp b/studio/kage/stage/stage.cpp index cef2d85..1bedbc5 100644 --- a/studio/kage/stage/stage.cpp +++ b/studio/kage/stage/stage.cpp @@ -190,29 +190,18 @@ bool KageStage::on_key_release_event(GdkEventKey *e) { } else if (e->keyval == GDK_KEY_C || e->keyval == GDK_KEY_c) { std::cout << "\tGDK_KEY_C COPY\n\n\n"; //operationSuccess = copySelectedShapes(); - try { - _kage->g_copiedData = _kage->_document.getScene()->getLayer()->getFrame()->copySelectedShapes( - //_kage->_document.getScene()->getLayer()->getFrame()->vectorsData._selectedShapes - selectedShapes - ); - std::cout << "copied " << _kage->g_copiedData.size() << std::endl; - } catch (std::exception& e) { - std::cout << "KageStage::on_key_release_event COPY Exception : " << e.what() << std::endl; - } + _kage->Copy_onClick(); } else if (e->keyval == GDK_KEY_V || e->keyval == GDK_KEY_v) { std::cout << "\tGDK_KEY_V PASTE\n\n\n"; //operationSuccess = pasteSelectedShapes(); - try { - selectedNodes = _kage->_document.getScene()->getLayer()->getFrame()->pasteSelectedShapes(_kage->g_copiedData); - operationSuccess = true; - } catch (std::exception& e) { - std::cout << "KageStage::on_key_release_event PASTE Exception : " << e.what() << std::endl; - } + _kage->Paste_onClick(); } else if (e->keyval == GDK_KEY_A || e->keyval == GDK_KEY_a) { + std::cout << "\tGDK_KEY_A SELECT\n\n\n"; if (toolMode != KageStage::MODE_SELECT) { _kage->ToolSelect_onClick(); } - operationSuccess = selectAllShapes(); + //operationSuccess = selectAllShapes(); + _kage->SelectAll_onClick(); /*} else if (e->keyval == GDK_KEY_Z || e->keyval == GDK_KEY_z) { _kage->Undo_onClick(); return true; diff --git a/studio/util/xml/xmltoken.cpp b/studio/util/xml/xmltoken.cpp index 61b5320..6eeefa3 100644 --- a/studio/util/xml/xmltoken.cpp +++ b/studio/util/xml/xmltoken.cpp @@ -1,7 +1,7 @@ /* * xmltoken.cpp * - * Copyright 2019 Mj Mendoza IV + * Copyright 2019~2024 Mj Mendoza IV * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ XmlToken::XmlToken() { setValue(""); } -XmlToken::XmlToken(string p_value) { +XmlToken::XmlToken(std::string p_value) { setValue(p_value); } @@ -35,10 +35,10 @@ XmlToken::~XmlToken() { // } -void XmlToken::setValue(string p_value) { +void XmlToken::setValue(std::string p_value) { _value = p_value; } -string XmlToken::getValue() { +std::string XmlToken::getValue() { return _value; } diff --git a/studio/util/xml/xmltoken.h b/studio/util/xml/xmltoken.h index c381d9f..1ad367b 100644 --- a/studio/util/xml/xmltoken.h +++ b/studio/util/xml/xmltoken.h @@ -1,7 +1,7 @@ /* * xmltoken.h * - * Copyright 2019 Mj Mendoza IV + * Copyright 2019~2024 Mj Mendoza IV * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,18 +26,17 @@ #include #include - using namespace std; class XmlToken { public: XmlToken(); - XmlToken(string p_value); + XmlToken(std::string p_value); virtual ~XmlToken(); - void setValue(string p_value); - string getValue(); + void setValue(std::string p_value); + std::string getValue(); protected: - string _value; + std::string _value; }; #endif //KAGE_UTIL_XML_TOKEN_H