[studio] Fix closing tab with unsaved changes
This commit is contained in:
parent
13e256b3a9
commit
a44c5acc4b
30
deps/buildcore/scripts/file-to-cpp.py
vendored
Executable file
30
deps/buildcore/scripts/file-to-cpp.py
vendored
Executable file
@ -0,0 +1,30 @@
|
||||
#! /usr/bin/env python3
|
||||
|
||||
#
|
||||
# Copyright 2016 - 2025 gary@drinkingtea.net
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--file', help='path to file')
|
||||
parser.add_argument('--out-cpp', help='path to output cpp file')
|
||||
parser.add_argument('--out-hpp', help='path to output hpp file')
|
||||
parser.add_argument('--namespace', help='path to output hpp file')
|
||||
args = parser.parse_args()
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
err = main()
|
||||
sys.exit(err)
|
||||
except KeyboardInterrupt:
|
||||
sys.exit(1)
|
@ -254,6 +254,7 @@ void StudioUI::drawTabs() noexcept {
|
||||
if (!open) {
|
||||
if (e->unsavedChanges()) {
|
||||
m_closeFileConfirm.open();
|
||||
++it;
|
||||
} else {
|
||||
e->close();
|
||||
if (m_activeEditor == (*it).get()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user