Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shinespeciall committed Jul 20, 2020
1 parent e149e27 commit 8b4f00b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions WL4EditorWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ bool WL4EditorWindow::UnsavedChangesPrompt(QString str)
/// <param name="roomId">
/// Optional param for selecting a room to clear, set -1 as a default value for current room.
/// </param>
void WL4EditorWindow::ClearEverythingInRoom(bool no_warning, int roomId)
void WL4EditorWindow::ClearEverythingInRoom(bool no_warning)
{
bool IfDeleteAllDoors = false;
// Show asking deleting Doors messagebox
Expand Down Expand Up @@ -1117,7 +1117,7 @@ void WL4EditorWindow::ClearEverythingInRoom(bool no_warning, int roomId)
}

// Clear Layers 0, 1, 2
LevelComponents::Room *currentRoom = CurrentLevel->GetRooms()[roomId];
LevelComponents::Room *currentRoom = CurrentLevel->GetRooms()[selectedRoom];
for (int i = 0; i < 3; ++i)
{
LevelComponents::Layer *layer = currentRoom->GetLayer(i);
Expand Down Expand Up @@ -1952,5 +1952,5 @@ void WL4EditorWindow::on_actionNew_Room_triggered()
OutputWidget->PrintString("Created a new blank room (# " + QString::number(newRoomId) + ") using the current room's settings.");

// Clear everything in the new room
ClearEverythingInRoom(true, selectedRoom);
ClearEverythingInRoom(true);
}
2 changes: 1 addition & 1 deletion WL4EditorWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class WL4EditorWindow : public QMainWindow
static bool SaveCurrentFile() { return ROMUtils::SaveLevel(ROMUtils::ROMFilePath); }
bool SaveCurrentFileAs();
bool UnsavedChangesPrompt(QString str);
void ClearEverythingInRoom(bool no_warning = false, int roomId = -1);
void ClearEverythingInRoom(bool no_warning = false);

protected:
void resizeEvent(QResizeEvent *event);
Expand Down

0 comments on commit 8b4f00b

Please sign in to comment.