Closed damiensellier closed 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;
}
FIXED
Row 1035 in Core - CtrlrPanelFileOperations.cpp