Minor bug fix - Print layout open / save

Sep 29, 2011 at 1:20 PM

In the print layout, if you open a template - make some edits to it - and then go and open another template you get prompted to save your changes - but instead of getting a save dialog - you go straight to an open dialog.

Looking at the code the error is in the line in: Dotspatial.Controls LayoutControl.cs LoadLayout if (dr == DialogResult.OK) which should be if (dr == DialogResult.Yes)

Can someone make this change and submit it please.


        public void NewLayout(bool promptSave)
            if (_layoutElements.Count > 0 && promptSave)
                DialogResult dr = MessageBox.Show(this, MessageStrings.LayoutSaveFirst, "DotSpatial Print Layout", MessageBoxButtons.YesNoCancel);
                if (dr == DialogResult.Cancel)
                if (dr == DialogResult.Yes)
Sep 29, 2011 at 5:13 PM

Thanks for the note. Feel free to open a bug report in cases like this.

Fixed in changeset cfde30fab5fd