Skip to content

Commit

Permalink
fix: FS#1145 - Closing inactive tab of a modified drawing: drawing fi…
Browse files Browse the repository at this point in the history
…le name mixup
  • Loading branch information
qcad committed Dec 10, 2014
1 parent 724a88b commit 3a171cd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/File/NewFile/NewFile.js
Expand Up @@ -296,6 +296,12 @@ NewFile.updateTitle = function(mdiChild) {
* Called when the user is about to close the drawing.
*/
NewFile.closeRequested = function(mdiChild) {
// make sure the closing MDI child is the active one
// (not the case if inactive tab is closed using close button on tab):
var appWin = EAction.getMainWindow();
var mdiArea = EAction.getMdiArea();
mdiArea.setActiveSubWindow(mdiChild);

var di = mdiChild.getDocumentInterface();
var document = mdiChild.getDocument();

Expand Down

0 comments on commit 3a171cd

Please sign in to comment.