Skip to content

Commit b9e04b4

Browse files
committed
Fixed images not saving when right clicking the save button
1 parent e24970e commit b9e04b4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ Target framework .NET 4.5.1 using [MapleLib](https://github.com/haha01haha01/Map
66
- Select multiple cells, rows or columns
77
- Double click 'Properties' cells to view formatted data
88
- Read straight from WZ files and save as BIN to save disk space and load times
9+
- Right click the save button to save all images into a folder
910

1011
![application screenshot](https://raw.githubusercontent.com/izarooni/WzVisualizer/master/WzVisualizer/Resources/screenshot1.png)

WzVisualizer/GUI/Form1.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,8 @@ private void BtnSave_Click(object sender, EventArgs ev) {
585585
}
586586
case MouseButtons.Right: {
587587
var control = TabControlMain.SelectedTab.Controls[0];
588-
if (control is DataGridView grid) // no child tabs and contains 1 child Control (DataGridView)
589-
GridIOUtility.ExportGridImages(grid, TabControlMain.SelectedTab.Text);
588+
if (control is DataViewer dataViewer) // no child tabs and contains 1 child Control (DataGridView)
589+
GridIOUtility.ExportGridImages(dataViewer.GridView, TabControlMain.SelectedTab.Text);
590590
else if (control is TabControl tab) { // contains child controls (e.g. Equips.Hairs, Equips.Faces)
591591
control = tab.SelectedTab; // The selected child Tab (e.g. Equips.Hairs)
592592
GridIOUtility.ExportGridImages((DataGridView)control.Controls[0], TabControlMain.SelectedTab.Text); // The DataGridView contained in the TabPage control

0 commit comments

Comments
 (0)