damiensellier / CtrlrX

CtlrX is an alternative fork of Roman Kubiak's Ctrlr. This project is ONLY aimed at delivering updates, a wiki, documentations, tutorials or anything that the community cannot share on the original Ctrlr github due to credential restrictions.
BSD 3-Clause "New" or "Revised" License
16 stars 3 forks source link

Save message error #27

Closed damiensellier closed 6 days ago

damiensellier commented 6 days ago

Row 1035 in Core - CtrlrPanelFileOperations.cpp

int ret = AlertWindow::showYesNoCancelBox(AlertWindow::QuestionIcon, "Save panel (" + getName() + ")", "There are unsaved changes in this panel.\nDo you want to save them before closing ?", "Save", "Discard", "Cancel");
Added \n and corrected "berfore"
damiensellier commented 6 days ago
bool CtrlrPanel::canClose(const bool closePanel)
{
    bool result = true;
    // Check for modified Lua Code
    CtrlrPanelWindowManager &manager = getWindowManager();
    if (manager.isCreated(CtrlrPanelWindowManager::LuaMethodEditor))
    {
        CtrlrChildWindowContent *content = manager.getContent(CtrlrPanelWindowManager::LuaMethodEditor);
        if (content != nullptr)
        {   // Move the editor to front
            content->toFront(true);
            if (!content->canCloseWindow())
            {
                result = false;
            }
        }
    }
    // Check for panel modifications
    if(closePanel && (hasChangedSinceSavePoint() || isPanelDirty()))
    {
    //int ret = AlertWindow::showYesNoCancelBox(AlertWindow::QuestionIcon, "Save panel (" + getName() + ")", "There are unsaved changes in this panel. Do you want to save them berfore closing ?", "Save", "Discard", "Cancel");
        int ret = AlertWindow::showYesNoCancelBox(AlertWindow::QuestionIcon, "Save panel (" + getName() + ")", "There are unsaved changes in this panel.\nDo you want to save them before closing ?", "Save", "Discard", "Cancel"); // Added v5.6.31 by GoodWeather

        if (ret == 0)
        {   // Cancel
            result = false;
        }
        else if (ret == 1)
        {   // Save
            savePanel();
            result = true;
        }
        else
        {   // Discard
            result = true;
        }
    }
    return result;
}
damiensellier commented 6 days ago

FIXED

Capture d’écran, le 2024-06-29 à 17 31 40